[openib-general] cm-id->context should be NULL forIB_CM_REQ_RECEIVED ?

Fab Tillier ftillier at silverstorm.com
Mon Jun 13 14:56:04 PDT 2005


> From: Jeff Carr [mailto:jcarr at linuxmachines.com]
> Sent: Monday, June 13, 2005 2:52 PM
> 
> On 06/13/05 14:12, Roland Dreier wrote:
> >     Jeff> On the recieving end of a request, when the handler gets
> >     Jeff> called and the cm-id gets passed to your handler (aka when
> >     Jeff> the handler gets IB_CM_REQ_RECEIVED) it seems cm-id->context
> >     Jeff> isn't null. Is there some useful data in there? If not, I
> >     Jeff> think it makes more sense (and makes code easier to write to
> >     Jeff> use the cm handler) if the context is set to NULL.
> >
> > I think the context gets populated from the context of the
> > corresponding cm_id that was passed to ib_cm_listen().
> 
> OK, thanks. I checked and it does look like that is what is happening.
> I'll set the context for the cm_id I pass into ib_cm_listen to null.
> Assuming of course, that the cm_id context for that one doesn't matter.

The CM doesn't interpret the user's context ever.  It is just there for the
benefit of the user.  If your app doesn't need the context in the REQ callback,
then you can set it to NULL.

Out of curiosity, if you don't set the listen's context, how do you figure out
which listen received the callback?  Does DAPL not care?

- Fab




More information about the general mailing list