[openib-general] MAD handling

Hal Rosenstock halr at voltaire.com
Mon Nov 15 07:22:44 PST 2004


On Mon, 2004-11-15 at 10:20, Roland Dreier wrote:
>     Roland> - Also, if I'm reading the code correctly, it seems that
>     Roland> in handle_outgoing_smp, mad_priv->mad will be dispatched
>     Roland> even if no response was generated by the call to
>     Roland> process_mad (ie we might pass garbage to the receive
>     Roland> handler).
> 
>     Hal> Are you referring to if SUCCESS is set without CONSUMED or
>     Hal> REPLY (after calling process_mad for a local MAD) ? Is this
>     Hal> the trap repress case (from the SM to the local SMA) ?
> 
> I'm just talking about the code starting below in handle_outgoing_smp():
> 
> 		/* See if response is solicited and there is a recv handler */
> 		mad_agent_priv = container_of(mad_agent,
> 					      struct ib_mad_agent_private,
> 					      agent);
> 		if (solicited_mad(&mad_priv->mad.mad) && 
> 		    mad_agent_priv->agent.recv_handler) {
> 
> It seems we will start passing the MAD to the recv_handler without
> checking that process_mad() generated a reply (indeed without checking
> that we even called process_mad()).

I see what you mean. There are a number of cases which should skip this
and just call the send handler. I'll issue a patch for this. Thanks.

-- Hal




More information about the general mailing list