[openib-general] ioctl and send_agents

Hal Rosenstock halr at voltaire.com
Wed Jan 10 04:36:03 PST 2007


On Mon, 2007-01-08 at 06:28, Michael Arndt wrote: 
> Hi,
> 
> Thanks for the fast answer.
> 
> > OpenSM registers agents in opensm/osm_sm_mad_ctrl.c:osm_sm_mad_ctrl_bind
> > and opensm/osm_sa_mad_ctrl.c:osm_sa_mad_ctrl_bind. osm_sm_mad_ctrl_bind
> > is called from osm_sm.c:osm_sm_bind and osm_sa_mad_ctrl_bind is called
> > from osm_sa.c:osm_sa_bind. Both osm_sm_bind and osm_sa_bind are called
> > from opensm/osm_opensm.c:osm_opensm_bind which is in turn called from
> > main.c during OpenSM startup. That is the vendor independent part.
> >
> > The vendor dependant part is done in the vendor layer. For OpenIB, it is
> > done in osm_vendor_ibumad.c:osm_vendor_bind.
> 
> I looked at the osm_vendor_bind and seen the umad_register call. But if I 
> checked the umad_register function (libibumad/src/umad.c) I just see an 
> ioctl call again.

What do you mean by "again" here ? Where was the "previous" ioctl ?

register and unregister are done via ioctl.

>  And if it right that the user_mad module is uses at kernel 
> space

Yes, it uses ib_umad module (which is built from user_mad.c).

> shouldn't there be a call like unlocked_ioctl or compat_ioctl like 
> defined in this module?

In user_mad.c, both unlocked/compat_ioctl are defined:

static struct file_operations umad_fops = {
        .owner          = THIS_MODULE,
        .read           = ib_umad_read,
        .write          = ib_umad_write,
        .poll           = ib_umad_poll,
        .unlocked_ioctl = ib_umad_ioctl,
        .compat_ioctl   = ib_umad_ioctl,
        .open           = ib_umad_open,
        .release        = ib_umad_close
};

> These agents are all receiver agents and you say nothing about send agents 
> for SM?

When you say send agents, do you mean send only agents or something else
? Assuming you mean send only agents, I don't think that the SM/SA uses
send only agents. I think we had a previous discussion of send only
agents in the context of IB agents (SMA, ...).

-- Hal

> Thanks Michael





More information about the general mailing list