]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Make the wqe_index_mask calculation more exact
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Fri, 30 Sep 2022 16:28:51 +0000 (09:28 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 1 Oct 2022 20:30:19 +0000 (13:30 -0700)
commit3f24622fd5a23147d4db6303de89e8f1c494304d
tree5cc1315c56b6f598ee1d59c61a6b4d0f22b5f9df
parentff409db3d558460c2616ccfb83cf31dbe26a380d
net/mlx5e: Make the wqe_index_mask calculation more exact

The old calculation of wqe_index_mask may give false positives, i.e.
request bulking of pairs of WQEs when not strictly needed, for example,
when the first fragment size is equal to the PAGE_SIZE, bulking is not
needed, even if the number of fragments is odd.

Make the calculation more exact to cut false positives.

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: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/params.c