[openib-general] [PATCH] ib_cancel_mad API
Sean Hefty
mshefty at ichips.intel.com
Wed Sep 29 11:56:58 PDT 2004
On Wed, 29 Sep 2004 11:17:05 -0700
Sean Hefty <mshefty at ichips.intel.com> wrote:
> + if (mad_send_wr->refcount == 0) {
> + list_del(&mad_send_wr->agent_send_list);
> + spin_unlock_irqrestore(&mad_agent_priv->send_list_lock, flags);
> +
> + mad_send_wc.status = IB_WC_WR_FLUSH_ERR;
> + mad_send_wc.vendor_err = 0;
> + mad_send_wc.wr_id = mad_send_wr->wr_id;
> + mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
> + &mad_send_wc);
> +
> + kfree(mad_send_wr);
> + if (atomic_dec_and_test(&mad_agent_priv->refcount))
> + wake_up(&mad_agent_priv->wait);
> + return 0;
> + }
> + spin_unlock_irqrestore(&mad_agent_priv->send_list_lock, flags);
> + return -EBUSY;
> +}
I'm not sure that a client would care between a return code of 0, versus -EBUSY. Even if -EBUSY is returned, the canceled MAD could still have been returned to the user.
More information about the general
mailing list