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

Or Gerlitz ogerlitz at voltaire.com
Tue Jan 2 00:05:41 PST 2007


Michael S. Tsirkin wrote:
> ib_wc currently only includes the local QP number: this matches the IB spec,
> but seems mostly useless. The following patch replaces this with the pointer
> to qp itself, and updates all low level drivers and all users.

> Use case:
> 
> In IPoIB CM code, I have a common CQ shared by multiple QPs.
> To track connection usage, I need a way to get at some per-QP context
> upon the completion, and I would like to avoid allocating
> context object per work request just to stick a QP pointer into it.
> With this code, I can just use wc->qp->qp_context.

IPoIB CM uses SRQ so you can not stick a qp context in advanced, simply 
b/c you can't tell on behalf of which QP this WR would be used.

However, looking on ipoib_cm_handle_rx_wc and the code is calls, i don't 
see where it uses wc->qp_num. Actually, unless the wc status is not 
success, why would you care from which QP you have got this packet?

Or.





More information about the general mailing list