netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] idpf: don't skip over ethtool tcp-data-split setting
@ 2024-05-15  9:24 Michal Schmidt
  2024-05-15  9:31 ` Alexander Lobakin
  2024-05-17  2:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Schmidt @ 2024-05-15  9:24 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Przemek Kitszel, Michal Kubiak,
	Alexander Lobakin
  Cc: Xu Du, intel-wired-lan, netdev, linux-kernel

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")
Reported-by: Xu Du <xudu@redhat.com>
Closes: https://issues.redhat.com/browse/RHEL-36182
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
 drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
index 986d429d1175..6972d728431c 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
@@ -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)) {
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] idpf: don't skip over ethtool tcp-data-split setting
  2024-05-15  9:24 [PATCH net] idpf: don't skip over ethtool tcp-data-split setting Michal Schmidt
@ 2024-05-15  9:31 ` Alexander Lobakin
  2024-05-17  2:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Lobakin @ 2024-05-15  9:31 UTC (permalink / raw)
  To: Michal Schmidt
  Cc: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Przemek Kitszel, Michal Kubiak,
	Xu Du, intel-wired-lan, netdev, linux-kernel

From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 15 May 2024 11:24:14 +0200

> 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!

> 
> 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")
> Reported-by: Xu Du <xudu@redhat.com>
> Closes: https://issues.redhat.com/browse/RHEL-36182
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>

Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>

> ---
>  drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> index 986d429d1175..6972d728431c 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] idpf: don't skip over ethtool tcp-data-split setting
  2024-05-15  9:24 [PATCH net] idpf: don't skip over ethtool tcp-data-split setting Michal Schmidt
  2024-05-15  9:31 ` Alexander Lobakin
@ 2024-05-17  2:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-17  2:40 UTC (permalink / raw)
  To: Michal Schmidt
  Cc: jesse.brandeburg, anthony.l.nguyen, davem, edumazet, kuba, pabeni,
	przemyslaw.kitszel, michal.kubiak, aleksander.lobakin, xudu,
	intel-wired-lan, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-17  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-15  9:24 [PATCH net] idpf: don't skip over ethtool tcp-data-split setting Michal Schmidt
2024-05-15  9:31 ` Alexander Lobakin
2024-05-17  2:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).