Skip to content

Commit

Permalink
net/mlx5e: Update netdev features after changing XDP state
Browse files Browse the repository at this point in the history
[ Upstream commit f6279f1 ]

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: cf6e34c ("net/mlx5e: Properly block LRO when XDP is enabled")
Fixes: b0617e7 ("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>
  • Loading branch information
nvmmax authored and gregkh committed Jun 14, 2022
1 parent b50eef7 commit e9fe72b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/en_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4576,6 +4576,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;
}

Expand Down

0 comments on commit e9fe72b

Please sign in to comment.