Skip to content

Commit 5575b76

Browse files
jakemoronirleon
authored andcommitted
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: b48c24c ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Jacob Moroni <[email protected]> Link: https://patch.msgid.link/[email protected] Acked-by: Tatyana Nikolova <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 8d158f4 commit 5575b76

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/infiniband/hw/irdma/verbs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,6 +2503,7 @@ static int irdma_create_cq(struct ib_cq *ibcq,
25032503
spin_lock_init(&iwcq->lock);
25042504
INIT_LIST_HEAD(&iwcq->resize_list);
25052505
INIT_LIST_HEAD(&iwcq->cmpl_generated);
2506+
iwcq->cq_num = cq_num;
25062507
info.dev = dev;
25072508
ukinfo->cq_size = max(entries, 4);
25082509
ukinfo->cq_id = cq_num;

drivers/infiniband/hw/irdma/verbs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ struct irdma_srq {
140140
struct irdma_cq {
141141
struct ib_cq ibcq;
142142
struct irdma_sc_cq sc_cq;
143-
u16 cq_num;
143+
u32 cq_num;
144144
bool user_mode;
145145
atomic_t armed;
146146
enum irdma_cmpl_notify last_notify;

0 commit comments

Comments
 (0)