]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/mlx5e: Fix the value of MLX5E_MAX_RQ_NUM_MTTS
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Thu, 26 May 2022 13:48:47 +0000 (16:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:15:50 +0000 (15:15 +0200)
commite6cbd15950cf7a6c60d92029f644301e5e6623a7
tree2d61dcdc0d386a2d603c011b55cb2f4609706ed5
parent1f7ffdea19f2fe38179d7ae2c0c6d8182e874308
net/mlx5e: Fix the value of MLX5E_MAX_RQ_NUM_MTTS

[ Upstream commit 562696c3c62c7c23dd896e9447252ce9268cb812 ]

MLX5E_MAX_RQ_NUM_MTTS should be the maximum value, so that
MLX5_MTT_OCTW(MLX5E_MAX_RQ_NUM_MTTS) fits into u16. The current value of
1 << 17 results in MLX5_MTT_OCTW(1 << 17) = 1 << 16, which doesn't fit
into u16. This commit replaces it with the maximum value that still
fits u16.

Fixes: 73281b78a37a ("net/mlx5e: Derive Striding RQ size from MTU")
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en.h