Skip to contentSkip to conversation

RDMA/irdma: Set irdma_cq cq_num field during CQ create

PATCH Applied Jacob Moroni 3 participants 3 messages Sep 23, 2025 – Oct 19, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/irdma: Set irdma_cq cq_num field during CQ create

The driver maintains a CQ table that is used to ensure that a CQ is still valid when processing CQ related AEs. When a CQ is destroyed, the table entry is cleared, using irdma_cq.cq_num as the index. This field was never being set, so it was just always clearing out entry 0.

Additionally, the cq_num field size was increased to accommodate HW supporting more than 64K CQs.

Fixes b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
---
 drivers/infiniband/hw/irdma/verbs.c | 1 +
 drivers/infiniband/hw/irdma/verbs.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/irdma/verbs.c +1 -0
index 646939e3d..fd13b190a 100644
@@ -2503,6 +2503,7 @@ static int irdma_create_cq(struct ib_cq *ibcq,
 	spin_lock_init(&iwcq->lock);
 	INIT_LIST_HEAD(&iwcq->resize_list);
 	INIT_LIST_HEAD(&iwcq->cmpl_generated);
+	iwcq->cq_num = cq_num;
 	info.dev = dev;
 	ukinfo->cq_size = max(entries, 4);
 	ukinfo->cq_id = cq_num;
drivers/infiniband/hw/irdma/verbs.h +1 -1
index ed21c1b56..ac8b38701 100644
@@ -140,7 +140,7 @@ struct irdma_srq {
 struct irdma_cq {
 	struct ib_cq ibcq;
 	struct irdma_sc_cq sc_cq;
-	u16 cq_num;
+	u32 cq_num;
 	bool user_mode;
 	atomic_t armed;
 	enum irdma_cmpl_notify last_notify;
Signature · 1 line
2.51.0.534.gc79095c0ca-goog
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines

-----Original Message-----
From: Jacob Moroni <[email protected]>
Sent: Tuesday, September 23, 2025 9:25 AM
To: Nikolova, Tatyana E <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Jacob Moroni <[email protected]>
Subject: [PATCH rdma-next] RDMA/irdma: Set irdma_cq cq_num field during CQ create

The driver maintains a CQ table that is used to ensure that a CQ is still valid when processing CQ related AEs. When a CQ is destroyed, the table entry is cleared, using irdma_cq.cq_num as the index. This field was never being set, so it was just always clearing out entry 0.

Quoted 7 lines

Additionally, the cq_num field size was increased to accommodate HW supporting more than 64K CQs.

Fixes b48c24c2d710 ("RDMA/irdma: Implement device supported verb

APIs")

---

Thank you

#2 lore raw
In reply to Jacob Moroni
Quoted 10 lines · Jacob Moroni

The driver maintains a CQ table that is used to ensure that a CQ is still valid when processing CQ related AEs. When a CQ is destroyed, the table entry is cleared, using irdma_cq.cq_num as the index. This field was never being set, so it was just always clearing out entry 0.

Additionally, the cq_num field size was increased to accommodate HW supporting more than 64K CQs.

[...]

Applied, thanks!

[1/1] RDMA/irdma: Set irdma_cq cq_num field during CQ create

      https://git.kernel.org/rdma/rdma/c/5575b7646b94c0

Best regards,

Signature · 1 line
Leon Romanovsky <[email protected]>