Fix the value of the pkey_index in the completion to get a valid value for GSI
QPs.
Signed-off-by: Dotan Barak <[EMAIL PROTECTED]>
---
diff --git a/src/cq.c b/src/cq.c
index 06ae9e2..33823c8 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 = (uint16_t)(ntohl(cqe->immed_rss_invalid) &
0x7f);
}
return CQ_OK;
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general