diff options
author | Krzysztof Czurylo <krzysztof.czurylo@intel.com> | 2023-07-25 18:55:04 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-07-26 15:05:36 +0300 |
commit | e49bad785e550fe26ca9416ffc0c85fef84be808 (patch) | |
tree | e37a23a6ee018384a6be6f63d71e491d9ceec4f7 /drivers/infiniband/hw/irdma/verbs.h | |
parent | 133b1cba46c6c8b67c630eacc0a1e4969da16517 (diff) | |
download | linux-e49bad785e550fe26ca9416ffc0c85fef84be808.tar.xz |
RDMA/irdma: Add table based lookup for CQ pointer during an event
Add a CQ table based loookup to allow quick search
for CQ pointer having CQ ID in case of CQ related
asynchrononous event. The table is implemented in a
similar fashion to QP table.
Also add a reference counters for CQ. This is to prevent
destroying CQ while an asynchronous event is being processed.
The memory resource table size is sized higher with this update,
and this table doesn't need to be physically contiguous, so use
a vzalloc vs kzalloc to allocate the table.
Signed-off-by: Krzysztof Czurylo <krzysztof.czurylo@intel.com>
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/20230725155505.1069-4-shiraz.saleem@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/irdma/verbs.h')
-rw-r--r-- | drivers/infiniband/hw/irdma/verbs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/irdma/verbs.h b/drivers/infiniband/hw/irdma/verbs.h index a536e9fa85eb..9de7217df357 100644 --- a/drivers/infiniband/hw/irdma/verbs.h +++ b/drivers/infiniband/hw/irdma/verbs.h @@ -122,6 +122,8 @@ struct irdma_cq { u32 cq_mem_size; struct irdma_dma_mem kmem; struct irdma_dma_mem kmem_shadow; + struct completion free_cq; + refcount_t refcnt; spinlock_t lock; /* for poll cq */ struct irdma_pbl *iwpbl; struct irdma_pbl *iwpbl_shadow; |