[openib-general] Re: CM ID destruction callback for kernel CM ?

Sean Hefty mshefty at ichips.intel.com
Tue May 10 09:27:14 PDT 2005


Hal Rosenstock wrote:
> Hi Sean,
> 
> The kernel CM is currently capable of destroying the CM ID at the end of
> the callback by setting ret to other than 0:
>  * Users may not call ib_destroy_cm_id while in the context of this callback;
>  * however, returning a non-zero value instructs the communication manager to
>  * destroy the @cm_id after the callback completes. 
> 
> Perhaps also a CM ID destruction callback could be added to:
> struct ib_cm_id *ib_create_cm_id(ib_cm_handler cm_handler,
>                                  void *context);
> which would also be called (if non NULL) on CM ID destruction at the end
> of the CM callback user invoked CM ID destruction. In that way, a client
> could cause some additional related destruction immediately subsequent
> to the CM ID destruction on its behalf. That might be useful to CM
> clients to simplify them.

I don't think this is needed.  The CM will serialize all callbacks relative 
to a single cm_id, and by returning a non-zero value, no additional 
callbacks will be generated.  The user should be able to cleanup all 
resources before returning from the CM callback.

- Sean




More information about the general mailing list