aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/rdma
diff options
context:
space:
mode:
authorJieqiang Wang <jieqiang.wang@arm.com>2023-03-22 21:27:23 +0800
committerBeno�t Ganne <bganne@cisco.com>2023-04-21 09:13:43 +0000
commit26c76052431c3959be02df60a1ea815d62409e43 (patch)
treef1d87786687e39787fa8b498b40b437a24c09555 /src/plugins/rdma
parent2cebd4270de70e952881975a048524e409cc9760 (diff)
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 <jieqiang.wang@arm.com> Change-Id: I67494f029967af64051f51452eba1fd699984cd9
Diffstat (limited to 'src/plugins/rdma')
-rw-r--r--src/plugins/rdma/format.c2
1 files changed, 1 insertions, 1 deletions
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);