]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Fix flow counter query via DEVX
authorMark Bloch <mbloch@nvidia.com>
Thu, 13 Apr 2023 09:23:09 +0000 (12:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:35 +0000 (23:03 +0900)
commite233013ab0a1420b2e28d9b17f0904d10943a19e
tree02fdb27c7c7eb08d2ba5fb009bf70c963a91f642
parent888e69bbf2fe9893ad454efad3faeb513767df95
RDMA/mlx5: Fix flow counter query via DEVX

[ Upstream commit 3e358ea8614ddfbc59ca7a3f5dff5dde2b350b2c ]

Commit cited in "fixes" tag added bulk support for flow counters but it
didn't account that's also possible to query a counter using a non-base id
if the counter was allocated as bulk.

When a user performs a query, validate the flow counter id given in the
mailbox is inside the valid range taking bulk value into account.

Fixes: 100edf70b7be ("IB/mlx5: Support flow counters offset for bulk counters")
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Link: https://lore.kernel.org/r/79d7fbe291690128e44672418934256254d93115.1681377114.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx5/devx.c
include/linux/mlx5/mlx5_ifc.h