[openib-general] Fwd: issues in ipoib

Sean Hefty sean.hefty at intel.com
Thu Aug 3 17:02:56 PDT 2006


>Yes.  But if the user already has to keep track of when the deregister
>of its SA client starts, then what is gained by taking a reference
>when a query starts?

It seems cleaner to me.  When a user calls query(), they provide a pointer to
their sa_client.  We take a reference to that pointer and store it in the
sa_query structure.  We now expect that pointer to be valid at a later point, so
we can increment the reference count on it.  Why not increment the reference
count when we take the actual reference and save off the pointer?

The benefit is that when the user later tries to deregister, deregister will
block while there's an outstanding query.  This eliminates the need for clients
to track their queries, cancel all of them, then wait for them to complete
before calling deregister - which would involve another reference count and
completion structure on the part of the client.

Thinking about this more, I can see where a user would want to create one struct
ib_sa_client per device to simplify their life handling device removal.

- Sean




More information about the general mailing list