]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:31 +0000 (15:42 -0500)
commit0e7cd3e5c1dce572bcf165444fed08be69aeea9a
tree844ac2c548170f4ebee2622375d9c039f3acb01f
parent94842be226f155f17b0c3c5ce686c42d73e3e547
net/mlx5e: RX, Mind the MPWQE gaps when calculating offsets

BugLink: https://bugs.launchpad.net/bugs/1922601
[ Upstream commit d5dd03b26ba49c4ffe67ee1937add82293c19794 ]

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: c3c9402373fe ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.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