]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Add headroom only to the first fragment in legacy RQ
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Wed, 26 Jan 2022 13:49:23 +0000 (15:49 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 17 Mar 2022 18:51:54 +0000 (11:51 -0700)
commita65ca87a4c5f2a65ed73875db9c8c50ce1852155
treeaa7812bf7ec7501c3e4f4a0c780283c9886e6478
parent48f4fc6e179c2b01095e10831bac4f85c43a6073
net/mlx5e: Add headroom only to the first fragment in legacy RQ

Currently, rq->buff.headroom is applied to all fragments in legacy RQ.
In the linear mode, there is a non-zero headroom, but there is only one
fragment per packet. In the non-linear mode, the headroom is zero.

This commit changes the logic to apply the headroom only to the first
fragment. The current behavior remains the same for both linear and
non-linear modes. However, it allows the next commit to enable headroom
for the non-linear mode, which will be applied only to the first
fragment.

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_rx.c