]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Properly block HW GRO when XDP is enabled
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Tue, 12 Apr 2022 15:54:26 +0000 (18:54 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 18 May 2022 06:03:55 +0000 (23:03 -0700)
commit2125deee1f609970facf173e6980999310a7aa6d
tree71569db9f0152f8c41a312abeca8530c899da12d
parentcdfa51004b5003afc67fa4a1f63cd8ded6edc929
net/mlx5e: Properly block HW GRO when XDP is enabled

HW GRO is incompatible and mutually exclusive with XDP and XSK. However,
the needed checks are only made when enabling XDP. If HW GRO 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 and XSK status in
mlx5e_fix_features and disabling HW GRO if XDP is enabled.

Fixes: 6ac6f0bf68bb ("net/mlx5e: Add HW-GRO offload")
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_main.c