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.


_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to