[openib-general] MAD handling

Roland Dreier roland at topspin.com
Mon Nov 15 07:20:37 PST 2004


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

I guess I'll extend user_mad.c to handle timeouts then.

    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()).

 - Roland




More information about the general mailing list