]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDMA/mlx5: Support optional-counters binding for QPs
authorPatrisious Haddad <phaddad@nvidia.com>
Thu, 13 Mar 2025 14:18:46 +0000 (16:18 +0200)
committerLeon Romanovsky <leon@kernel.org>
Tue, 18 Mar 2025 10:18:57 +0000 (06:18 -0400)
commitfd24c9ef6c8f12fd045524c7cae1992f7967e94b
tree5139a341a4a3702afc3f2fe37f7a3e48bfca5d89
parent36e0d433672f1e65400d69e7eaf7150752c45e29
RDMA/mlx5: Support optional-counters binding for QPs

Add support to allow optional-counters binding to a QP, whereas when
a bind operation is requested depending on the counter optional-counter
binding state the driver will determine if to also add optional-counters
to this QP binding.

The optional-counter binding is done by simply adding a steering
rule for the specific optional-counter condition with the additional
match over that QP number.

Note that optional-counters per QP rules are handled on an earlier prio
than per device counters, and per device counter correctness is maintained
by core whereas it is responsible to sum active counters when checking device
counter and to add them to history count when they are deallocated.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/2cad1b891a6641ae61fe8d92f867e1059121813a.1741875070.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
include/linux/mlx5/device.h