* [PATCH net-next 1/2] net/mlx5e: Update features on MTU change
2024-10-24 16:41 [PATCH net-next 0/2] mlx5e update features on config changes Tariq Toukan
@ 2024-10-24 16:41 ` Tariq Toukan
2024-10-25 8:52 ` Simon Horman
2024-10-24 16:41 ` [PATCH net-next 2/2] net/mlx5e: Update features on ring size change Tariq Toukan
2024-10-29 19:00 ` [PATCH net-next 0/2] mlx5e update features on config changes patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Tariq Toukan @ 2024-10-24 16:41 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
Andrew Lunn
Cc: netdev, Saeed Mahameed, Gal Pressman, Leon Romanovsky,
Dragos Tatulea, Tariq Toukan
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>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++++
1 file changed, 4 insertions(+)
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;
}
--
2.44.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] net/mlx5e: Update features on MTU change
2024-10-24 16:41 ` [PATCH net-next 1/2] net/mlx5e: Update features on MTU change Tariq Toukan
@ 2024-10-25 8:52 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2024-10-25 8:52 UTC (permalink / raw)
To: Tariq Toukan
Cc: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
Andrew Lunn, netdev, Saeed Mahameed, Gal Pressman,
Leon Romanovsky, Dragos Tatulea
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next 2/2] net/mlx5e: Update features on ring size change
2024-10-24 16:41 [PATCH net-next 0/2] mlx5e update features on config changes Tariq Toukan
2024-10-24 16:41 ` [PATCH net-next 1/2] net/mlx5e: Update features on MTU change Tariq Toukan
@ 2024-10-24 16:41 ` Tariq Toukan
2024-10-25 8:52 ` Simon Horman
2024-10-29 19:00 ` [PATCH net-next 0/2] mlx5e update features on config changes patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Tariq Toukan @ 2024-10-24 16:41 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
Andrew Lunn
Cc: netdev, Saeed Mahameed, Gal Pressman, Leon Romanovsky,
Dragos Tatulea, Tariq Toukan
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>
---
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +++
1 file changed, 3 insertions(+)
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;
}
--
2.44.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/2] net/mlx5e: Update features on ring size change
2024-10-24 16:41 ` [PATCH net-next 2/2] net/mlx5e: Update features on ring size change Tariq Toukan
@ 2024-10-25 8:52 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2024-10-25 8:52 UTC (permalink / raw)
To: Tariq Toukan
Cc: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
Andrew Lunn, netdev, Saeed Mahameed, Gal Pressman,
Leon Romanovsky, Dragos Tatulea
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/2] mlx5e update features on config changes
2024-10-24 16:41 [PATCH net-next 0/2] mlx5e update features on config changes Tariq Toukan
2024-10-24 16:41 ` [PATCH net-next 1/2] net/mlx5e: Update features on MTU change Tariq Toukan
2024-10-24 16:41 ` [PATCH net-next 2/2] net/mlx5e: Update features on ring size change Tariq Toukan
@ 2024-10-29 19:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-29 19:00 UTC (permalink / raw)
To: Tariq Toukan
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, netdev, saeedm, gal,
leonro
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 24 Oct 2024 19:41:31 +0300 you wrote:
> Hi,
>
> This small patchset by Dragos adds a call to netdev_update_features()
> in configuration changes that could impact the features status.
>
> Series generated against:
> commit 81bc949f640f ("selftests: tls: add a selftest for wrapping rec_seq")
>
> [...]
Here is the summary with links:
- [net-next,1/2] net/mlx5e: Update features on MTU change
https://git.kernel.org/netdev/net-next/c/7999da12a670
- [net-next,2/2] net/mlx5e: Update features on ring size change
https://git.kernel.org/netdev/net-next/c/a7b6c074e42d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread