aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2006-12-31 14:09:42 -0500
committerRoland Dreier <rolandd@cisco.com>2007-02-04 17:11:55 -0500
commit062dbb69f32b9ccea701b30f8cc0049482e6211f (patch)
tree063b57c57dfce3ff2775a64721f5fe311752247a /include/rdma/ib_verbs.h
parent459d6e2a541a5226825db998e627e0aa046aa257 (diff)
IB: Return qp pointer as part of ib_wc
struct 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 (for ehca it would actually be expensive to find the QP pointer when polling a CQ, but ehca does not support SRQ so we can leave wc->qp as NULL for ehca) - Users that need the QP number can still get it through wc->qp->qp_num Use case: In IPoIB connected mode 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. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r--include/rdma/ib_verbs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 73aafd7bb503..765589f4d166 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -420,8 +420,8 @@ struct ib_wc {
420 enum ib_wc_opcode opcode; 420 enum ib_wc_opcode opcode;
421 u32 vendor_err; 421 u32 vendor_err;
422 u32 byte_len; 422 u32 byte_len;
423 struct ib_qp *qp;
423 __be32 imm_data; 424 __be32 imm_data;
424 u32 qp_num;
425 u32 src_qp; 425 u32 src_qp;
426 int wc_flags; 426 int wc_flags;
427 u16 pkey_index; 427 u16 pkey_index;