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
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 <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
  • Loading branch information
nvmmax authored and Saeed Mahameed committed May 31, 2022
1 parent 3fc2a9e commit f6279f1
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 @@ -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;
}

Expand Down

0 comments on commit f6279f1

Please sign in to comment.