From 26c76052431c3959be02df60a1ea815d62409e43 Mon Sep 17 00:00:00 2001 From: Jieqiang Wang Date: Wed, 22 Mar 2023 21:27:23 +0800 Subject: rdma: fix rx CQ mask to calculate right next_cqe_index Set the mask of calculating the next cqe index to the corresponding CQ size instead of rxq size. Type: fix Signed-off-by: Jieqiang Wang Change-Id: I67494f029967af64051f51452eba1fd699984cd9 --- src/plugins/rdma/format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/rdma/format.c b/src/plugins/rdma/format.c index e2bf22512e8..b477c115405 100644 --- a/src/plugins/rdma/format.c +++ b/src/plugins/rdma/format.c @@ -281,7 +281,7 @@ format_rdma_rxq (u8 * s, va_list * args) if (rd->flags & RDMA_DEVICE_F_MLX5DV) { - u32 next_cqe_index = rxq->cq_ci & (rxq->size - 1); + u32 next_cqe_index = rxq->cq_ci & ((1 << rxq->log2_cq_size) - 1); s = format (s, "\n%Uwq: stride %u wqe-cnt %u", format_white_space, indent + 2, rxq->wq_stride, rxq->wqe_cnt); -- cgit 1.2.3-korg