net/mlx5e: Fix wrong calculation of header index in HW_GRO
authorKhalid Manaa <khalidm@nvidia.com>
Wed, 26 Jan 2022 12:14:58 +0000 (14:14 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 2 Feb 2022 04:59:41 +0000 (20:59 -0800)
commitb8d91145ed7cfa046cc07bcfb277465b9d45da73
tree538a42f0ba3469bafb4acabd7639cda07e6cb9d0
parent880b517691908fb753019b9b27cd082e7617debd
net/mlx5e: Fix wrong calculation of header index in HW_GRO

The HW doesn't wrap the CQE.shampo.header_index field according to the
headers buffer size, instead it always increases it until reaching overflow
of u16 size.

Thus the mlx5e_handle_rx_cqe_mpwrq_shampo handler should mask the
CQE header_index field to find the actual header index in the headers buffer.

Fixes: f97d5c2a453e ("net/mlx5e: Add handle SHAMPO cqe support")
Signed-off-by: Khalid Manaa <khalidm@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c