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

Sean Hefty mshefty at ichips.intel.com
Tue Jan 2 10:59:12 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.
> 
> This has the following advantages:
> - Ability to get a per-qp context through wc->qp->qp_context
> - Existing drivers already have the qp pointer ready in poll cq, so
>   this change actually saves a tiny bit (extra memory read) on data path
> - We will be able to put NULL in there if some hardware does not support
>   reporting the qp number (it is optional in IB spec) - no such option with qpn
> - Users that need the QP number can still get it through wc->qp->qp_num.

IMO, if we can return the qp pointer rather than the qpn without additional 
cost, we should do so.

- Sean




More information about the general mailing list