[openib-general] [PATCH RFC] return qp pointer as part of ib_wc

Michael S. Tsirkin mst at mellanox.co.il
Tue Jan 9 21:17:24 PST 2007


>  > > this is now returning a pointer to the MAD layer's internal QP.  I
>  > > guess this is OK -- the only user of the pointer seems to be the mthca
>  > > MAD_IFC command, which just grabs the QP number anyway.  But I just
>  > > wanted to point out this wart...
>  > 
>  > What's the problem with this?
> 
> It's a bit of a layering violation -- a consumer uses the MAD layer
> through the agent abstraction and so on, and then ends up getting a
> pointer to the MAD layer's QP struct.
> 
> I don't think it's really a big deal but it's worth pointing out.

Yea.
Well, one can argue that passing ib_wc for a work request that
a client didn't build is a layering violation too - e.g. the wr_id
does not make much sense either, does it?

But it still seems easier than invent a ib_mad_wc.

-- 
MST




More information about the general mailing list