diff options
author | Kalesh AP <kalesh-anakkur.purayil@broadcom.com> | 2025-08-22 09:37:55 +0530 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2025-09-11 02:18:07 -0400 |
commit | b5942828ea5f8ba5fcdde71b1ac5473bdb5004e2 (patch) | |
tree | e055c281b17a7e7aadca76ac3675b3fe2c159e31 /drivers/infiniband/hw/bnxt_re/qplib_res.h | |
parent | 2419b16a3db539ce5c506a60ee4b85723ce78bd5 (diff) |
RDMA/bnxt_re: Refactor stats context memory allocation
Moved the stats context allocation logic to a new function.
The stats context memory allocation code has been moved from
bnxt_qplib_alloc_hwctx() to the newly added bnxt_re_get_stats_ctx()
function. Also, the code to send the firmware command has been moved.
This patch is in preparation for other patches in this series.
There is no functional changes intended.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://patch.msgid.link/20250822040801.776196-5-kalesh-anakkur.purayil@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/qplib_res.h')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/qplib_res.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.h b/drivers/infiniband/hw/bnxt_re/qplib_res.h index 9d866cfdebab..ed1be06c2c60 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_res.h +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.h @@ -441,6 +441,11 @@ int bnxt_qplib_map_db_bar(struct bnxt_qplib_res *res); void bnxt_qplib_unmap_db_bar(struct bnxt_qplib_res *res); int bnxt_qplib_determine_atomics(struct pci_dev *dev); +int bnxt_qplib_alloc_stats_ctx(struct pci_dev *pdev, + struct bnxt_qplib_chip_ctx *cctx, + struct bnxt_qplib_stats *stats); +void bnxt_qplib_free_stats_ctx(struct pci_dev *pdev, + struct bnxt_qplib_stats *stats); static inline void bnxt_qplib_hwq_incr_prod(struct bnxt_qplib_db_info *dbinfo, struct bnxt_qplib_hwq *hwq, u32 cnt) |