[openib-general] [PATCH] ib_cancel_mad API

Sean Hefty mshefty at ichips.intel.com
Wed Sep 29 15:26:55 PDT 2004


On Wed, 29 Sep 2004 15:20:20 -0700
Roland Dreier <roland at topspin.com> wrote:

>     Sean> Currently, the consumer _only_ has to free their send
>     Sean> context in their send MAD completion handler.  No reference
>     Sean> counting by the consumer is needed.  And it doesn't matter
>     Sean> if a send succeeds, timeouts, has an error, or is canceled.
> 
> The consumer does need to do reference counting.  If I cancel a MAD
> and get -EINVAL back, I might still get a completion later, so I have
> to have a count of the number of MADs outstanding and wait for that to
> go to zero.

What is the client doing with the reference counting?  When their send handler gets called, they free their send context.  After they deregister, they free their mad_agent context.



More information about the general mailing list