Message ID | 20241024164134.299646-2-tariqt@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 7999da12a6706f10ef47f2a4d34ebd5bc99a26de |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mlx5e update features on config changes | expand |
On Thu, Oct 24, 2024 at 07:41:32PM +0300, Tariq Toukan wrote: > From: Dragos Tatulea <dtatulea@nvidia.com> > > When the MTU changes successfully, trigger netdev_update_features() to > enable features in wanted state if applicable. > > An example of such scenario: > $ ip link set dev eth1 up > $ ethtool --set-ring eth1 rx 8192 > $ ip link set dev eth1 mtu 9000 > $ ethtool --features eth1 rx-gro-hw on --> fails > $ ip link set dev eth1 mtu 7000 > > With this patch, HW GRO will be turned on automatically because > it is set in the device's wanted_features. > > Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> > Reviewed-by: Gal Pressman <gal@nvidia.com> > Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org>
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index ce94859014f8..235d00300626 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4557,6 +4557,10 @@ int mlx5e_change_mtu(struct net_device *netdev, int new_mtu, out: WRITE_ONCE(netdev->mtu, params->sw_mtu); mutex_unlock(&priv->state_lock); + + if (!err) + netdev_update_features(netdev); + return err; }