]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:24 +0000 (18:41 +0200)
[ Upstream commit f6279f113ad593971999c877eb69dc3d36a75894 ]

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: cf6e34c8c22f ("net/mlx5e: Properly block LRO when XDP is enabled")
Fixes: b0617e7b3500 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c

index 9730bd96d0deb60dd1d0ce2404dafcd46a065375..352b5c8ae24e3bfdbf09c43173ad9b68d16c5b94 100644 (file)
@@ -4531,6 +4531,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;
 }