]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Prevent high-rate FW commands from populating all slots
authorTariq Toukan <tariqt@nvidia.com>
Tue, 2 Aug 2022 11:47:30 +0000 (14:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jan 2024 12:38:55 +0000 (12:38 +0000)
commit148ec770c63e5a338a5c7d2b27aaa1eb2bcb1c91
treea52dbb5daddfd8fbf23f5f551cf1ecd7de2a6f90
parentbd6e091629103f1ceaedbd9d41f68e1c5b2731b9
net/mlx5: Prevent high-rate FW commands from populating all slots

[ Upstream commit 63fbae0a74c3e1df7c20c81e04353ced050d9887 ]

Certain connection-based device-offload protocols (like TLS) use
per-connection HW objects to track the state, maintain the context, and
perform the offload properly. Some of these objects are created,
modified, and destroyed via FW commands. Under high connection rate,
this type of FW commands might continuously populate all slots of the FW
command interface and throttle it, while starving other critical control
FW commands.

Limit these throttle commands to using only up to a portion (half) of
the FW command interface slots. FW commands maximal rate is not hit, and
the same high rate is still reached when applying this limitation.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Stable-dep-of: 8f5100da56b3 ("net/mlx5e: Fix a race in command alloc flow")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
include/linux/mlx5/driver.h