[openib-general] MAD receive work completion
roland at topspin.com
Thu Mar 10 17:00:21 PST 2005
Sean> It could be done without an API change, likely changing 3-4
Sean> lines of code, with the result that the work completion
Sean> would be copied for all received MADs. (The copy could be
Sean> avoided with a more extensive change, but I would go with a
Sean> simpler solution for now.)
Sorry, you're right. I hadn't gone back and looked at the actual API,
and I didn't remember that ib_free_recv_mad() takes the whole
struct ib_mad_recv_wc (I thought it just took the ib_mad_recv_buf).
Sean> To me, it seems that the behavior isn't what a user would
Sean> expect given the current API. The ib_mad_recv_wc belongs to
Sean> the user until it is freed, but one of the fields in it
Sean> exists only during the callback. Is this the behavior that
Sean> we want?
I agree, this is rather ugly.
Now I'm not sure whether it makes sense to change the wc member of
struct ib_mad_recv_wc from a struct ib_wc * to just a struct ib_wc.
On the one hand it makes the API slightly cleaner, but on the other
hand it is an incompatible change that may limit the internal
implementation of handling MAD receives.
More information about the general