[openib-general] [PATCH] review for new MAD APIs

Sean Hefty mshefty at ichips.intel.com
Wed Sep 15 08:58:14 PDT 2004


On Wed, 15 Sep 2004 07:54:08 -0400
Hal Rosenstock <halr at voltaire.com> wrote:

> > +/**
> > + * ib_free_recv_mad - Returns data buffers used to receive a MAD to the
> > + *   access layer.
> > + * @mad_recv_wc - Work completion information for a received MAD.
> > + *
> > + * Clients receiving MADs through their ib_mad_recv_handler must call this
> > + * routine to return the work completion buffers to the access layer.
> > + */
> > +void ib_free_recv_mad(struct ib_mad_recv_wc *mad_recv_wc);
> > +
> > +/**
> 
> Either the client needs to explictly do this or the MAD layer would
> assume this is the case upon return from the receive callback. 
> 
> They both have their downsides so I'm not sure which is better.

My initial thought is to make this an asynchronous operation.  This gives clients more flexibility with respect to their MAD handling, while still avoiding a data copy on the receive path.  E.g. something like the CM can schedule a separate thread to perform whatever processing it requires before returning the MAD.

As a side note, when QP redirection is supported, this call is still needed to free the work completion structures, but would not free the data buffers (which are owned by the client).



More information about the general mailing list