[openib-general] MAD receive work completion

Sean Hefty mshefty at ichips.intel.com
Thu Mar 10 16:35:39 PST 2005


Roland Dreier wrote:

>     Sean> I'm hitting an issue in the CM where I need to access work
>     Sean> completion information about a received MAD.  The CM takes
>     Sean> the received MAD and queues it to a CM owned work queue for
>     Sean> processing.  It then accesses the wc field from
>     Sean> ib_mad_recv_wc shown below.
> 
> This doesn't seem worth an API change to me.  I think the simplest and
> best solution is just to copy the work completion information you need
> into the work structure you put onto your workqueue.

It could be done without an API change, likely changing 3-4 lines of 
code, with the result that the work completion would be copied for all 
received MADs.  (The copy could be avoided with a more extensive 
change, but I would go with a simpler solution for now.)

To me, it seems that the behavior isn't what a user would expect given 
the current API.  The ib_mad_recv_wc belongs to the user until it is 
freed, but one of the fields in it exists only during the callback.  Is 
this the behavior that we want?

- Sean



More information about the general mailing list