]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDMA/core: Create and destroy rdma_counter using rdma_zalloc_drv_obj()
authorPatrisious Haddad <phaddad@nvidia.com>
Thu, 13 Mar 2025 14:18:42 +0000 (16:18 +0200)
committerLeon Romanovsky <leon@kernel.org>
Tue, 18 Mar 2025 10:18:37 +0000 (06:18 -0400)
commit7e53b31acc7f976d01a0718724a4c36f1fddf739
treea4d4d0235f73ead1cf81ba99000ffb275c24736d
parentd375db42a8effdfeb7973d4f1b0b5985e066fd28
RDMA/core: Create and destroy rdma_counter using rdma_zalloc_drv_obj()

Change rdma_counter allocation to use rdma_zalloc_drv_obj() instead of,
explicitly allocating at core, in order to be contained inside driver
specific structures.

Adjust all drivers that use it to have their containing structure, and
add driver specific initialization operation.

This change is needed to allow upcoming patches to implement
optional-counters binding whereas inside each driver specific counter
struct his bound optional-counters will be maintained.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/a5a484f421fc2e5595158e61a354fba43272b02d.1741875070.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/counters.c
drivers/infiniband/core/device.c
drivers/infiniband/hw/mlx5/counters.c
drivers/infiniband/hw/mlx5/counters.h
include/rdma/ib_verbs.h