[ofw] [RFC] ib cm: export CM only interface
Sean Hefty
sean.hefty at intel.com
Tue Nov 18 15:50:53 PST 2008
>> static void
>> cm_destroy_id(iba_cm_id *p_id)
>> {
>> al_destroy_cep(gh_al, &p_id->cid, FALSE);
>
>The al_destroy_cep function does not block, so you could receive a callback
>after you free the ID. You need a way to mark the ID freed so that the handler
>doesn't invoke the callback. You then need to do reference counting on your ID
>structures so that they can be freed after the CEP manager is done with them.
>Alternatively, you can allocate an event/block until the CEP is freed (your
>destroy callback is invoked).
At least this area of the code needs work. I will move iba_cm_id into a larger
structure that contains an event that gets signaled by a destroy callback.
cm_destroy_id() will wait on that event before freeing p_id.
The other place where al_destroy_cep() is called should be fine, since it's
inside the callback for the listen.
- Sean
More information about the ofw
mailing list