]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5e: Update netdev features after changing XDP state
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Mon, 23 May 2022 12:39:13 +0000 (15:39 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 31 May 2022 20:40:55 +0000 (13:40 -0700)
Some features (LRO, HW GRO) conflict with XDP. If there is an attempt to
enable such features while XDP is active, they will be set to `off
[requested on]`. In order to activate these features after XDP is turned
off, the driver needs to call netdev_update_features(). This commit adds
this missing call after XDP state changes.

Fixes: dd58ae3c5a64 ("net/mlx5e: Properly block LRO when XDP is enabled")
Fixes: 23cea8f61fb4 ("net/mlx5e: Properly block HW GRO when XDP is enabled")
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

index 930a5402c817c1c25bf4d4bbd2f5317758ad5f78..087952b84ccb0970c70447c09e75c8011b6135e0 100644 (file)
@@ -4569,6 +4569,11 @@ static int mlx5e_xdp_set(struct net_device *netdev, struct bpf_prog *prog)
 
 unlock:
        mutex_unlock(&priv->state_lock);
+
+       /* Need to fix some features. */
+       if (!err)
+               netdev_update_features(netdev);
+
        return err;
 }