Commit 8f3a8f3e authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds

[PATCH] InfiniBand/core: add QP number to work completion struct

InfiniBand spec rev 1.2 compliance: add local qp number to work completion
structure.
Signed-off-by: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dede3413
...@@ -2025,6 +2025,7 @@ static void local_completions(void *data) ...@@ -2025,6 +2025,7 @@ static void local_completions(void *data)
wc.slid = IB_LID_PERMISSIVE; wc.slid = IB_LID_PERMISSIVE;
wc.sl = 0; wc.sl = 0;
wc.dlid_path_bits = 0; wc.dlid_path_bits = 0;
wc.qp_num = IB_QP0;
local->mad_priv->header.recv_wc.wc = &wc; local->mad_priv->header.recv_wc.wc = &wc;
local->mad_priv->header.recv_wc.mad_len = local->mad_priv->header.recv_wc.mad_len =
sizeof(struct ib_mad); sizeof(struct ib_mad);
......
...@@ -444,6 +444,8 @@ static inline int mthca_poll_one(struct mthca_dev *dev, ...@@ -444,6 +444,8 @@ static inline int mthca_poll_one(struct mthca_dev *dev,
spin_lock(&(*cur_qp)->lock); spin_lock(&(*cur_qp)->lock);
} }
entry->qp_num = (*cur_qp)->qpn;
if (is_send) { if (is_send) {
wq = &(*cur_qp)->sq; wq = &(*cur_qp)->sq;
wqe_index = ((be32_to_cpu(cqe->wqe) - (*cur_qp)->send_wqe_offset) wqe_index = ((be32_to_cpu(cqe->wqe) - (*cur_qp)->send_wqe_offset)
......
...@@ -352,6 +352,7 @@ struct ib_wc { ...@@ -352,6 +352,7 @@ struct ib_wc {
u32 vendor_err; u32 vendor_err;
u32 byte_len; u32 byte_len;
__be32 imm_data; __be32 imm_data;
u32 qp_num;
u32 src_qp; u32 src_qp;
int wc_flags; int wc_flags;
u16 pkey_index; u16 pkey_index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment