[openib-general] mad_agents

Hal Rosenstock halr at voltaire.com
Wed Dec 13 03:52:43 PST 2006


Hi Michael,

On Tue, 2006-12-12 at 13:21, Michael Arndt wrote:
> Hi,
> 
> the following statements about functions and modules refer to the mad.c, 
> agent.c and user_mad.c file.
> 
> during the initialisation of the mad module a funktion ib_agent_port_open is 
> called(ib_mad_init_device -> ib_mad_port_open). At this point an agent is 
> registered (ib_register_mad_agent), without a MAD registration request 
> applied. So my question is, what is this agent for?

When there is no registration, that means those agents are "send only"
agents. "Send only" means the agent will only receive solicited
responses and will not receive any unsolicited MADs.

Those agents that are started are for SMI (QP0) and GSI (QP1). The SMA
sits on QP0 (shared with SM). Many GS agents (including the PMA, also
SA) sit on top of QP1.

> And is it right that the agent registered by the umad module 
> (ib_umad_ioctl -> ib_umad_reg_agent -> ib_register_mad_agent) gets all the 
> SMP packets from the device and passes them to the SM (read and 
> FileDescriptior).

user_mad registrations occur via the ioctl. It only gets those packets
it registers for. These can include SMPs as well as GMPs depending on
user agents registered. The diagnostics use these (DR SMPs, LR SMPs, and
GMPs).

The agent only gets those MADs that the SMA does not handle. This is
done via the status passed back to process_mad (IB_MAD_RESULT_XXXXX).

The SM registers for request/response matching on both SM and SA classes
with different method masks (as different methods apply). There are also
some unsolicited receives (e.g. traps) to be handled.

When request/response matching is used, the agent is determined by the
high 32 bits of the transaction ID which is overwritten in the (send of
the) request. Those 32 bits are the agent ID and used for demux to the
proper agent when the response (or timeout) occurs.

> What is about the SMA? Where are the SMPs filtered between SMA and SM?

process_mad in the MAD layer passes them to the driver (mthca_mad.c for
one example) for filtering. This filtering is based on the status
returned (IB_MAD_RESULT_XXXX in ib_mad.h).

> I also would like to say that it would be really nice if there would be some 
> papers, diagrams, grafics or anything else which explain how the whole 
> openib system works. The source code as only reference isn't really helping 
> for new developer.

Yes, that would be nice. Perhaps you can help here.

-- Hal

> Thanks Michael 
> 
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 





More information about the general mailing list