RDMA/mlx5: Refactor optional counters steering code
authorPatrisious Haddad <phaddad@nvidia.com>
Sun, 20 Jul 2025 09:37:24 +0000 (12:37 +0300)
committerLeon Romanovsky <leon@kernel.org>
Wed, 23 Jul 2025 07:38:57 +0000 (03:38 -0400)
commit10d4de4189533840f296ce7e48eac05b985d96bc
treef30e195f641440cc3effac9fd85da33556bb7920
parente1bed9a94da86a7c01b985c2e9a030207269cbc7
RDMA/mlx5: Refactor optional counters steering code

Currently there isn't a clear layer separation between the counters and
the steering code, whereas the steering code is doing redundant access
to the counter struct.

Separate the fs.c and counters.c, where fs code won't access or be
aware of counter structs but only the objects it needs.

As a result, move mlx5_rdma_counter struct from the header file to be
an internal struct for the counters file only.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Edward Srouji <edwards@nvidia.com>
Link: https://patch.msgid.link/9854d1fdb140e4a6552b7a2fd1a028cfe488a935.1753004208.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/counters.c
drivers/infiniband/hw/mlx5/counters.h
drivers/infiniband/hw/mlx5/fs.c
drivers/infiniband/hw/mlx5/mlx5_ib.h