Skip to contentSkip to conversation

mlx5e update features on config changes

PATCH Applied Tariq Toukan 3 participants 6 messages Oct 24, 2024 – Oct 29, 2024

Subsystems (4)
lore
Share & tools
lore

Tariq Toukan

author maintainer
#0 lore raw

cover mlx5e update features on config changes

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")

Thanks,
Tariq

Dragos Tatulea (2):
net/mlx5e: Update features on MTU change
net/mlx5e: Update features on ring size change

 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +++
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c    | 4 ++++
 2 files changed, 7 insertions(+)
Signature · 1 line
2.44.0
author maintainer
#1 lore raw

PATCH 1/2 net/mlx5e: Update features on MTU change

From: Dragos Tatulea <[email protected]>

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.

---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +4 -0
index ce94859014f8..235d00300626 100644
@@ -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;
 }
 
Signature · 1 line
2.44.0
reviewer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH net-next 1/2] net/mlx5e: Update features on MTU change

Quoted 12 lines · Tariq Toukan

From: Dragos Tatulea <[email protected]>

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
Quoted 6 lines

With this patch, HW GRO will be turned on automatically because it is set in the device's wanted_features.

author maintainer
#3 lore raw

PATCH 2/2 net/mlx5e: Update features on ring size change

In reply to Tariq Toukan

From: Dragos Tatulea <[email protected]>

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.

---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +3 -0
index 1966736f98b4..cae39198b4db 100644
@@ -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;
 }
 
Signature · 1 line
2.44.0
reviewer Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH net-next 2/2] net/mlx5e: Update features on ring size change

Quoted 13 lines · Tariq Toukan

From: Dragos Tatulea <[email protected]>

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
Quoted 6 lines

With this patch, HW GRO will be turned on automatically because it is set in the device's wanted_features.

#5 lore raw
In reply to Tariq Toukan
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html