]> git.baikalelectronics.ru Git - kernel.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)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 28 Jul 2022 20:44:24 +0000 (13:44 -0700)
commit2897b5550965e556d3abdc5e64dbe58f25dc7f02
treeeb781f30feed347bcaed676e916a2592d685237c
parent58c82dfba45c961ee89099c4efed108fedf2c19e
net/mlx5e: Fix the value of MLX5E_MAX_RQ_NUM_MTTS

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: 83b2d755fa6a ("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>
drivers/net/ethernet/mellanox/mlx5/core/en.h