[openib-general] Re: [PATCH] ipoib: device removal races

Sean Hefty mshefty at ichips.intel.com
Mon Aug 29 14:07:55 PDT 2005


Michael S. Tsirkin wrote:
> Its an sa query, so I'm not sure why would you want to modify a QP
> there.
> Further, please note that in the current API the callback is
> always called even if the query is cancelled.
> 
> And clearly you cant allow cancel under a spinlock and 
> at the same time ensure callback is performed and is allowed to sleep.
> 
> I think its not a big problem to let cancel return a code meaning
> "completion was cancelled, perform the callback yourself if you want
> to". I imagine ulps may special-case cancellation, anyway.
> 
> Would such an API change be OK?

This is similar to some of the discussions that went into cancel MADs. 
It should be possible for the SA to return a value from cancel that 
indicates that no callback will occur.  However, it's not possible for 
it to return a value that indicates that one will occur.  In the latter 
case, the callback could have already occurred or may be in progress. 
Which means that a user calling cancel has to be able to deal with a 
callback occurring anyway.

- Sean



More information about the general mailing list