With Rx interrupts enabled, the CQ of Rx queue i is created on
completion vector i. The device may expose fewer completion vectors
than Rx queues (the RHEL 8.10 mana_ib driver reports one), so
ibv_create_cq() fails with EINVAL for queue 1 and the port does not
start.
Spread the queues over the vectors the device has.
Fixes: afd5d170727e ("net/mana: support Rx interrupts")
Cc: [email protected]
Signed-off-by: Orgad Shaneh <[email protected]>
---
Builds on main (meson -Dwerror=true, gcc 14, rdma-core 56).
In use on 26.07 on an Azure MANA VF.
.mailmap | 1 +
drivers/net/mana/rx.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 08317e81e6..61d5c6df00 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1265,6 +1265,7 @@ Omkar Maslekar <[email protected]>
Omri Mor <[email protected]>
Ophir Munk <[email protected]> <[email protected]>
Or Ami <[email protected]>
+Orgad Shaneh <[email protected]>
Ori Kam <[email protected]> <[email protected]>
Ouyang Hao <[email protected]>
Owen Hilyard <[email protected]>
diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 274c6e88ce..aa21136167 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -289,7 +289,8 @@ mana_start_rx_queues(struct rte_eth_dev *dev)
rxq->cq = ibv_create_cq(priv->ib_ctx, rxq->num_desc,
NULL, rxq->channel,
- rxq->channel ? i : 0);
+ rxq->channel ?
+ i % priv->ib_ctx->num_comp_vectors : 0);
if (!rxq->cq) {
ret = -errno;
DRV_LOG(ERR, "failed to create rx cq queue %d", i);
--
2.53.0