From 16ec68c225c41ea0e090b6200385e11e783c2ef7 Mon Sep 17 00:00:00 2001 From: Dotan Barak Date: Fri, 11 Jan 2008 11:04:22 -0800 Subject: [PATCH] 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 Signed-off-by: Roland Dreier --- src/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.46.0