aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDotan Barak <dotanb@dev.mellanox.co.il>2008-01-11 11:04:22 -0800
committerRoland Dreier <rolandd@cisco.com>2008-01-11 11:04:22 -0800
commit16ec68c225c41ea0e090b6200385e11e783c2ef7 (patch)
treecfd549b9a6f0784d7188426271de5e8e11a44a7a
parent6bd4582bee9b87743e44c53408ec4d172c568348 (diff)
downloadlibmlx4-16ec68c225c41ea0e090b6200385e11e783c2ef7.tar.gz
Fix value of pkey_index in QP1 completions
Fix the value of pkey_index in completions. Since userspace can't create QP1, this doesn't matter, but we might as well have correct code. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--src/cq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cq.c b/src/cq.c
index d9ebff1..91297e4 100644
--- a/src/cq.c
+++ b/src/cq.c
@@ -319,7 +319,7 @@ static int mlx4_poll_one(struct mlx4_cq *cq,
wc->src_qp = g_mlpath_rqpn & 0xffffff;
wc->dlid_path_bits = (g_mlpath_rqpn >> 24) & 0x7f;
wc->wc_flags |= g_mlpath_rqpn & 0x80000000 ? IBV_WC_GRH : 0;
- wc->pkey_index = ntohl(cqe->immed_rss_invalid) >> 16;
+ wc->pkey_index = ntohl(cqe->immed_rss_invalid) & 0x7f;
}
return CQ_OK;