]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Feb 2022 11:39:56 +0000 (12:39 +0100)
commit66c6dbfc8493fc1b0192f74c12d417d911ee632b
tree43c80f5660d7241a0fc965f93743e64a92012956
parent8fbdf8c8b8ab82beab882175157650452c46493e
net/mlx5e: Fix wrong calculation of header index in HW_GRO

commit b8d91145ed7cfa046cc07bcfb277465b9d45da73 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c