Message ID | 20241024164134.299646-3-tariqt@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a7b6c074e42da96c106c6efd8f7925195fe3b411 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mlx5e update features on config changes | expand |
On Thu, Oct 24, 2024 at 07:41:33PM +0300, Tariq Toukan wrote: > From: Dragos Tatulea <dtatulea@nvidia.com> > > When the ring size 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 > $ ethtool --set-ring eth1 rx 1024 > > 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_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c index 1966736f98b4..cae39198b4db 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c @@ -406,6 +406,9 @@ int mlx5e_ethtool_set_ringparam(struct mlx5e_priv *priv, unlock: mutex_unlock(&priv->state_lock); + if (!err) + netdev_update_features(priv->netdev); + return err; }