net/mlx5e: Properly block LRO when XDP is enabled
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Tue, 12 Apr 2022 15:37:03 +0000 (18:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 May 2022 07:14:36 +0000 (09:14 +0200)
commitc0be5fec786b5aab3f5db222b28a64d0946d6658
tree8537f867a30340f3910a0777994ebc4d91185474
parent3277789f332ed34d46d35ee84992fd643f48aa4a
net/mlx5e: Properly block LRO when XDP is enabled

[ Upstream commit cf6e34c8c22fba66bd21244b95ea47e235f68974 ]

LRO is incompatible and mutually exclusive with XDP. However, the needed
checks are only made when enabling XDP. If LRO is enabled when XDP is
already active, the command will succeed, and XDP will be skipped in the
data path, although still enabled.

This commit fixes the bug by checking the XDP status in
mlx5e_fix_features and disabling LRO if XDP is enabled.

Fixes: 86994156c736 ("net/mlx5e: XDP fast RX drop bpf programs support")
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: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c