[openib-general] MAD receive work completion

Fab Tillier ftillier at infiniconsys.com
Thu Mar 10 16:49:41 PST 2005


> From: Sean Hefty [mailto:mshefty at ichips.intel.com]
> 
> 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?

It depends on the usage model.  If the majority of clients always process
the completion in a different thread context (i.e. using a workqueue like
the CM does), then I would say make the copy always.  Otherwise, I agree
with Roland and it should be up to the client.

However, if the CM needs to have the WC information beyond the work it does
in its work queue *and* saves the received mad structure already, then it
will copy it once from the receive callback into the work structure, and
then again into the cid structure.  Note that this only applies to the case
where the received MAD is saved beyond both the MAD completion callback and
the CM workqueue handler.

- Fab





More information about the general mailing list