[openib-general] RDMA CM callback status

Or Gerlitz ogerlitz at voltaire.com
Sun Sep 24 23:48:04 PDT 2006


Sean Hefty wrote:
>> 2. /* handle error out-of-line */ above means I record failure in my connection
>>   data structure, start teardown and drop the callback's reference on it.
>>   When the last reference goes, the connection data structure is queued for
>>   final destruction (including rdma_destroy_id(cmid)).
>>
>>   Given that this might race with the callback's caller is this OK?
> 
> Yes - The RDMA CM holds a reference on the cmid while in a callback, and drops
> it once the callback returns.  rdma_destroy_id() will block until all references
> are released on the cmid.

Eric,

Just to make sure, please be aware to the node in rdma_cm.h telling that 
you are not allowed to call rdma_destroy_id() from the **context** of 
the cma callback (since as Sean explained above in that case the cma 
will block on a ref which would never reach zero).

Or.





More information about the general mailing list