Is it ever allowed to call ib_destroy_cm_id() from a CM callback? For some reason I thought that this was OK from only the IDLE callback, but if I destroy from IDLE I get a hang on cm_id_priv->lock, I believe. Should the normal mode of operation in the case be to return an error from IDLE to ensure that cm_id gets cleaned-up?
You cannot call ib_destroy_cm_id from a callback. A reference is held on the cm_id while the callback is in progress, so the call to ib_destroy_cm_id will always block forever. The solution is to return a non-zero value from the callback itself, which will destroy the cm_id.
Note that you can destroy the cm_id at anytime. You don't need to wait for it to transition to IDLE. (The CM maintains the timewait state separate from the cm_id itself.)
- Sean _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
