]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: RX, Mind the MPWQE gaps when calculating offsets
authorTariq Toukan <tariqt@nvidia.com>
Tue, 12 Jan 2021 11:21:17 +0000 (13:21 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 10 Mar 2021 19:01:52 +0000 (11:01 -0800)
commita5ef241ebe39fcc62ec6086f1c1c5135f6d21bc3
treeaf50426d8902e1357671aa164fb8783cf74712ab
parent5f286b61fb9d9d24be80b69b44e690f5c2d84cb8
net/mlx5e: RX, Mind the MPWQE gaps when calculating offsets

Since cited patch, MLX5E_REQUIRED_WQE_MTTS is not a power of two.
Hence, usage of MLX5E_LOG_ALIGNED_MPWQE_PPW should be replaced,
as it lost some accuracy. Use the designated macro to calculate
the number of required MTTs.

This makes sure the solution in cited patch works properly.

While here, un-inline mlx5e_get_mpwqe_offset(), and remove the
unused RQ parameter.

Fixes: bf7501c7bf2d ("net/mlx5e: Add resiliency in Striding RQ mode for packets larger than MTU")
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c