Skip to contentSkip to conversation

idpf: don't skip over ethtool tcp-data-split setting

PATCH Applied Michal Schmidt 3 participants 3 messages May 15, 2024 – May 17, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 idpf: don't skip over ethtool tcp-data-split setting

Disabling tcp-data-split on idpf silently fails:

  # ethtool -G $NETDEV tcp-data-split off
  # ethtool -g $NETDEV | grep 'TCP data split'
  TCP data split:        on

But it works if you also change 'tx' or 'rx':

  # ethtool -G $NETDEV tcp-data-split off tx 256
  # ethtool -g $NETDEV | grep 'TCP data split'
  TCP data split:        off

The bug is in idpf_set_ringparam, where it takes a shortcut out if the TX and RX sizes are not changing. Fix it by checking also if the tcp-data-split setting remains unchanged. Only then can the soft reset be skipped.

Fixes 9b1aa3ef2328 ("idpf: add get/set for Ethtool's header split ringparam")
---
 drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/idpf/idpf_ethtool.c +2 -1
index 986d429d1175..6972d728431c 100644
@@ -376,7 +376,8 @@ static int idpf_set_ringparam(struct net_device *netdev,
 			    new_tx_count);
 
 	if (new_tx_count == vport->txq_desc_count &&
-	    new_rx_count == vport->rxq_desc_count)
+	    new_rx_count == vport->rxq_desc_count &&
+	    kring->tcp_data_split == idpf_vport_get_hsplit(vport))
 		goto unlock_mutex;
 
 	if (!idpf_vport_set_hsplit(vport, kring->tcp_data_split)) {
Signature · 1 line
2.44.0
Reviewed-by on v1 1/1
#1 lore raw

From: Michal Schmidt <[email protected]>
Date: Wed, 15 May 2024 11:24:14 +0200

Quoted 9 lines

Disabling tcp-data-split on idpf silently fails:

  # ethtool -G $NETDEV tcp-data-split off
  # ethtool -g $NETDEV | grep 'TCP data split'
  TCP data split:        on

But it works if you also change 'tx' or 'rx':

  # ethtool -G $NETDEV tcp-data-split off tx 256
  # ethtool -g $NETDEV | grep 'TCP data split'
  TCP data split:        off

Oh crap >_< I'm sorry, thanks for the fix!

Quoted 10 lines

The bug is in idpf_set_ringparam, where it takes a shortcut out if the TX and RX sizes are not changing. Fix it by checking also if the tcp-data-split setting remains unchanged. Only then can the soft reset be skipped.

Fixes 9b1aa3ef2328 ("idpf: add get/set for Ethtool's header split ringparam")
Quoted 9 lines
---
 drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/idpf/idpf_ethtool.c +0 -0
index 986d429d1175..6972d728431c 100644

drivers/net/ethernet/intel/idpf/idpf_ethtool.c static int idpf_set_ringparam(struct net_device *netdev, · line 383

Quoted 9 lines
drivers/net/ethernet/intel/idpf/idpf_ethtool.c +2 -1
@@ -376,7 +376,8 @@ static int idpf_set_ringparam(struct net_device *netdev,
 			    new_tx_count);
 
 	if (new_tx_count == vport->txq_desc_count &&
-	    new_rx_count == vport->rxq_desc_count)
+	    new_rx_count == vport->rxq_desc_count &&
+	    kring->tcp_data_split == idpf_vport_get_hsplit(vport))
 		goto unlock_mutex;
 
 	if (!idpf_vport_set_hsplit(vport, kring->tcp_data_split)) {

Olek

#2 lore raw
In reply to Michal Schmidt
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

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

Quoted 11 lines · On Wed, 15 May 2024 11:24:14 +0200 you wrote:

Disabling tcp-data-split on idpf silently fails:

  # ethtool -G $NETDEV tcp-data-split off
  # ethtool -g $NETDEV | grep 'TCP data split'
  TCP data split:        on

But it works if you also change 'tx' or 'rx':

  # ethtool -G $NETDEV tcp-data-split off tx 256
  # ethtool -g $NETDEV | grep 'TCP data split'
  TCP data split:        off

[...]

Here is the summary with links:
- [net] idpf: don't skip over ethtool tcp-data-split setting

    https://git.kernel.org/netdev/net/c/67708158e732

You are awesome, thank you!

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