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)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 11 Jan 2023 05:24:42 +0000 (21:24 -0800)
commit63fbae0a74c3e1df7c20c81e04353ced050d9887
tree3aa8067586732eb9e1183e120de00eb65f79b553
parent7cb5eb937231663d11f7817e366f6f86a142d6d3
net/mlx5: Prevent high-rate FW commands from populating all slots

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>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
include/linux/mlx5/driver.h