]> www.infradead.org Git - nvme.git/commit
net/mlx5: Limit non-privileged commands
authorChiara Meiohas <cmeiohas@nvidia.com>
Wed, 26 Feb 2025 13:01:07 +0000 (15:01 +0200)
committerLeon Romanovsky <leon@kernel.org>
Sat, 8 Mar 2025 18:22:42 +0000 (13:22 -0500)
commitf9deed0980fe29c57488f395528fe3d923c91b1f
tree6d533b06cce02aa7b04a6e23964cce5239676d6a
parent0a34fad1bed45ff2245ab8c315bc3d4c6471af46
net/mlx5: Limit non-privileged commands

Limit non-privileged UID commands to half of the available command slots
when privileged UIDs are present.
Privileged throttle commands will not be limited.

Use an xarray to store privileged UIDs. Add insert and remove functions
for privileged UIDs management.

Non-user commands (with uid 0) are not limited.

Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/d2f3dd9a0dbad3c9f2b4bb0723837995e4e06de2.1740574103.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
include/linux/mlx5/driver.h