net/mlx5e: SHAMPO, Cleanup reservation size formula
authorLama Kayal <lkayal@nvidia.com>
Mon, 21 Jul 2025 07:13:17 +0000 (10:13 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Jul 2025 01:20:14 +0000 (18:20 -0700)
commitbc2d44b83f2b333719560740068663a2b405deaf
tree77e22190d224a8c7a8754fa37e65aa7129536d76
parentad892e912b84b706ed399a212174978ddd1ac1f9
net/mlx5e: SHAMPO, Cleanup reservation size formula

The reservation size formula can be reduced to a simple evaluation of
MLX5E_SHAMPO_WQ_RESRV_SIZE. This leaves mlx5e_shampo_get_log_rsrv_size()
with one single use, which can be replaced with a macro for simplicity.

Also, function mlx5e_shampo_get_log_rsrv_size() is used only throughout
params.c, make it static.

Signed-off-by: Lama Kayal <lkayal@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/1753081999-326247-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/params.c
drivers/net/ethernet/mellanox/mlx5/core/en/params.h