[openib-general] Re: [PATCH] [MAD/Agent] convert agent.c to use ib_create_send_mad()

Hal Rosenstock halr at voltaire.com
Mon Oct 17 12:10:06 PDT 2005


On Mon, 2005-10-17 at 13:01, Sean Hefty wrote:
> Hal Rosenstock wrote:
> > Yes, but why not ? (I think that was also part of your change).
> 
> The agent code now allocates a buffer for the MAD by calling 
> ib_create_send_mad().  The input MAD buffer is copied to the send buffer, then 
> transmitted.  The result is that the input MAD buffer is always available for 
> posting on the receive queue.

What about the other resources needed ? Are they always available ?

> > At least, the errors should be indicated with printk's so it can be seen
> > in the log what failure occured in agent_send_response (like failed
> > ib_create_ah_from_wc or ib_create_send_mad or ib_post_send_mad).
> 
> IMO, the print statements would be better placed in agent_send_response(), which 
>   knows the context surrounding the failure, than by a caller.

That's what I was suggesting (but I didn't see them in your updated
patch).

> I'm fine with having the function return a value, but the return value will 
> still be ignored by mad.c.  I will change the function from void to int though, 
> so that a caller will be aware that a failure did occur.

OK.

-- Hal




More information about the general mailing list