]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/irdma: Set irdma_cq cq_num field during CQ create
authorJacob Moroni <jmoroni@google.com>
Tue, 23 Sep 2025 14:24:39 +0000 (14:24 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:35 +0000 (15:37 -0500)
[ Upstream commit 5575b7646b94c0afb0f4c0d86e00e13cf3397a62 ]

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")
Signed-off-by: Jacob Moroni <jmoroni@google.com>
Link: https://patch.msgid.link/20250923142439.943930-1-jmoroni@google.com
Acked-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/irdma/verbs.c
drivers/infiniband/hw/irdma/verbs.h

index 105ffb1764b8073a674651f986df091dd1407ab1..eb4683b248af94ce78b78a62036dc05e15f8b8aa 100644 (file)
@@ -2078,6 +2078,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;
index 4381e5dbe782ae54885cb8ff29de928bb9d3313d..36ff8dd712f00babf1e127e1504f1ed55808480a 100644 (file)
@@ -115,7 +115,7 @@ struct irdma_mr {
 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;