From: Maxim Mikityanskiy Date: Mon, 23 May 2022 12:39:13 +0000 (+0300) Subject: net/mlx5e: Update netdev features after changing XDP state X-Git-Tag: baikal/aarch64/sdk6.1~3836^2~8^2~1 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=39134969f84a13a1edaa75c5a426340e14dc1b53;p=kernel.git net/mlx5e: Update netdev features after changing XDP state 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 Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 930a5402c817c..087952b84ccb0 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -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; }