[openib-general] Re: [PATCH 1/3] iWARP Header Files

Sean Hefty mshefty at ichips.intel.com
Wed Mar 15 16:17:16 PST 2006


Tom Tucker wrote:
> The iw_event_handler is registered with the provider by the IW CM. The
> iw_cm_handler is registerd with the IW CM by the client. So when the
> provider generates an event, it is delivered to the event_handler. When
> the IW CM generates an event, it is delivered to the cm_handler. I guess
> the comments aren't particularly helpful. 

The comments make more sense now.  I need to understand how one of the callbacks 
can make use of a returned int, while the other is a void.

> The provider_id is the 'cookie' generated by the provider that uniquely
> identifies this connection and is passed down to the HW by the provider.
> The client doesn't use it. BTW, the alternative here is to have a
> create_cm_id and destroy_cm_id call in the provider. I opted for the
> 'cookie'.

None of the other core code makes use of a cookie that I'm aware of, so it's 
worth nothing that there's inconsistency with the rest of the stack.  I'm not as 
concerned about that as making sure that destruction is handled properly, since 
there's not a destroy call in the provider.

> Maybe the provider_id and the event_handler should probably be in
> private portion of the data structure.

That would provide for clearer encapsulation.

- Sean



More information about the general mailing list