[openib-general] [PATCH] ib_cancel_mad API

Sean Hefty mshefty at ichips.intel.com
Wed Sep 29 11:33:38 PDT 2004


On Wed, 29 Sep 2004 11:21:24 -0700
Roland Dreier <roland at topspin.com> wrote:

> +int ib_cancel_mad(struct ib_mad_agent *mad_agent,
> +		  u64 wr_id)
> 
> Is wr_id enough to identify a sent MAD?  I guess this imposes the
> requirement that consumers must not use duplicate wr_ids.

I didn't see any better alternative.  But, yes, users wanting to be able to cancel MADs cannot use duplicate wr_ids.

> This is exactly the issue I was talking about last time.  Since we
> remove the MAD from the send list before calling the consumer's send
> handler, it's entirely possible for ib_cancel_mad() to return -EINVAL
> with the send handler still running on another CPU ... oops.

I'm not sure why this is an issue.  The user receives exactly one callback for every sent MAD.  Even if the MAD is found, the cancel operation will not complete until after all posted work requests have completed.



More information about the general mailing list