[openib-general] MAD handling

Hal Rosenstock halr at voltaire.com
Mon Nov 15 05:42:30 PST 2004


On Mon, 2004-11-15 at 00:25, Roland Dreier wrote:
> A few questions about MAD handling:
> 
> - What is supposed to happen to MADs that are received and are
>   considered "solicited" because they have a method like GetResp, but
>   which don't match any outstanding sends?  Right now it looks as if
>   they will be silently dropped in find_mad_agent().  

This issue was brought up on the list last week in a thread entitled
"Solicited response with no matching send request". There seemed to be
no pressing need for this at the time. 

>   Unfortunately this doesn't work very well with the current user_mad.c stuff -- I
>   post all sends with a timeout of 0 and expect userspace to register
>   an agent to get responses.

I can work on a patch for this. One issue raised with this was not
providing an unmatched response if the client cancelled the send. This
means that the cancellations need to be kept around (at least for some
time period).

>   I could have user_mad.c use timeouts, but then we need to come up
>   with a way for the timeouts to be passed up to userspace.  I'd sort
>   of prefer to let userspace handle its own timeouts, although I could
>   be persuaded otherwise.

Seems to me like the SM would/could.should be using soliticed sends with
time outs. Maybe that's not the way this would be today just porting
what is already there. 

> - It looks as if the case of response DR SMPs going to the SM is not
>   handled in smi.c.  smi_check_forward_dr_smp() doesn't handle the
>   case of hop_ptr == 0, and smi_handle_dr_smp_send() just says
> 
> 		/* C14-13:4 -- hop_ptr = 0 -> should have gone to SM. */
> 
>   and returns 0, which will lead to the packet being dropped.  How
>   should this be fixed?

I will be working on SMI today/tomorrow to hopefully fix the remaining
cases. 

> - Also, if I'm reading the code correctly, it seems that in
>   handle_outgoing_smp, mad_priv->mad will be dispatched even if no
>   response was generated by the call to process_mad (ie we might pass
>   garbage to the receive handler).

Are you referring to if SUCCESS is set without CONSUMED or REPLY (after
calling process_mad for a local MAD) ? Is this the trap repress case
(from the SM to the local SMA) ?

-- Hal





More information about the general mailing list