[openib-general] RDMA Generic Connection Management
Gleb Natapov
glebn at voltaire.com
Thu Sep 1 09:23:07 PDT 2005
On Thu, Sep 01, 2005 at 09:10:14AM -0700, Sean Hefty wrote:
> Gleb Natapov wrote:
> >On Wed, Aug 31, 2005 at 11:11:40AM -0700, Sean Hefty wrote:
> >
> >>I don't have a good solution yet for calls like ib_cma_get_device(). Yet
> >>another possibility is to have it return a device pointer in a callback.
> >>Then it can synchronize with device removal internally.
> >>
> >
> >What if ib_cma_get_device() will return client data for the device and
> >we let the ULP to figure out whether the data is still valid in the way
> >most suitable for the ULP?
>
> While I think that returning the client data would be useful, I don't think
> that this really helps the ULP any. It seems likely that a client would
> free their client data upon removal of the associated device. So they
> can't trust this pointer any more than the device pointer.
>
The point is to let client decide how it synchronise access to the data
with remove callback. For instance it may use semaphore like this:
in connect: in remove callback:
down(sem) down(sem)
ptr = ib_cma_get_device() free(ptr)
use ptr up(sem)
up(sem)
--
Gleb.
More information about the general
mailing list