netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] selftests: drv-net: tso: increase the retransmit threshold
@ 2025-08-15 22:41 Jakub Kicinski
  2025-08-16  1:41 ` Daniel Zahka
  2025-08-20  1:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Jakub Kicinski @ 2025-08-15 22:41 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
	shuah, willemb, daniel.zahka, linux-kselftest

We see quite a few flakes during the TSO test against virtualized
devices in NIPA. There's often 10-30 retransmissions during the
test. Sometimes as many as 100. Set the retransmission threshold
at 1/4th of the wire frame target.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: shuah@kernel.org
CC: willemb@google.com
CC: daniel.zahka@gmail.com
CC: linux-kselftest@vger.kernel.org
---
 tools/testing/selftests/drivers/net/hw/tso.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/drivers/net/hw/tso.py b/tools/testing/selftests/drivers/net/hw/tso.py
index c13dd5efa27a..0998e68ebaf0 100755
--- a/tools/testing/selftests/drivers/net/hw/tso.py
+++ b/tools/testing/selftests/drivers/net/hw/tso.py
@@ -60,16 +60,17 @@ from lib.py import bkg, cmd, defer, ethtool, ip, rand_port, wait_port_listen
         sock_wait_drain(sock)
         qstat_new = cfg.netnl.qstats_get({"ifindex": cfg.ifindex}, dump=True)[0]
 
-        # No math behind the 10 here, but try to catch cases where
-        # TCP falls back to non-LSO.
-        ksft_lt(tcp_sock_get_retrans(sock), 10)
-        sock.close()
-
         # Check that at least 90% of the data was sent as LSO packets.
         # System noise may cause false negatives. Also header overheads
         # will add up to 5% of extra packes... The check is best effort.
         total_lso_wire  = len(buf) * 0.90 // cfg.dev["mtu"]
         total_lso_super = len(buf) * 0.90 // cfg.dev["tso_max_size"]
+
+        # Make sure we have order of magnitude more LSO packets than
+        # retransmits, in case TCP retransmitted all the LSO packets.
+        ksft_lt(tcp_sock_get_retrans(sock), total_lso_wire / 4)
+        sock.close()
+
         if should_lso:
             if cfg.have_stat_super_count:
                 ksft_ge(qstat_new['tx-hw-gso-packets'] -
-- 
2.50.1


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

* Re: [PATCH net-next] selftests: drv-net: tso: increase the retransmit threshold
  2025-08-15 22:41 [PATCH net-next] selftests: drv-net: tso: increase the retransmit threshold Jakub Kicinski
@ 2025-08-16  1:41 ` Daniel Zahka
  2025-08-18 15:52   ` Jakub Kicinski
  2025-08-20  1:00 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Zahka @ 2025-08-16  1:41 UTC (permalink / raw)
  To: Jakub Kicinski, davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, shuah, willemb,
	linux-kselftest


On 8/15/25 6:41 PM, Jakub Kicinski wrote:
> We see quite a few flakes during the TSO test against virtualized
> devices in NIPA. There's often 10-30 retransmissions during the
> test. Sometimes as many as 100. Set the retransmission threshold
> at 1/4th of the wire frame target.

Did this issue preexist these commits:
b25b44cd178c ("selftests: drv-net: tso: fix non-tunneled tso6 test case 
name")
2cfbcc5d8af9 ("selftests: drv-net: tso: fix vxlan tunnel flags to get 
correct gso_type")
266b835e5e84 ("selftests: drv-net: tso: enable test cases based on 
hw_features")

or is this a possible regression?

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

* Re: [PATCH net-next] selftests: drv-net: tso: increase the retransmit threshold
  2025-08-16  1:41 ` Daniel Zahka
@ 2025-08-18 15:52   ` Jakub Kicinski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2025-08-18 15:52 UTC (permalink / raw)
  To: Daniel Zahka
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
	willemb, linux-kselftest

On Fri, 15 Aug 2025 21:41:37 -0400 Daniel Zahka wrote:
> On 8/15/25 6:41 PM, Jakub Kicinski wrote:
> > We see quite a few flakes during the TSO test against virtualized
> > devices in NIPA. There's often 10-30 retransmissions during the
> > test. Sometimes as many as 100. Set the retransmission threshold
> > at 1/4th of the wire frame target.  
> 
> Did this issue preexist these commits:
> b25b44cd178c ("selftests: drv-net: tso: fix non-tunneled tso6 test case 
> name")
> 2cfbcc5d8af9 ("selftests: drv-net: tso: fix vxlan tunnel flags to get 
> correct gso_type")
> 266b835e5e84 ("selftests: drv-net: tso: enable test cases based on 
> hw_features")
> 
> or is this a possible regression?

I think it existed before, but it was much harder to spot flakes prior
to those fixes because the whole test was failing. Here's an example of
110 retransmits 3 weeks before those fixes:
https://netdev-3.bots.linux.dev/vmksft-fbnic-qemu/results/192642/4-tso-py/stdout

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

* Re: [PATCH net-next] selftests: drv-net: tso: increase the retransmit threshold
  2025-08-15 22:41 [PATCH net-next] selftests: drv-net: tso: increase the retransmit threshold Jakub Kicinski
  2025-08-16  1:41 ` Daniel Zahka
@ 2025-08-20  1:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-08-20  1:00 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
	willemb, daniel.zahka, linux-kselftest

Hello:

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

On Fri, 15 Aug 2025 15:41:00 -0700 you wrote:
> We see quite a few flakes during the TSO test against virtualized
> devices in NIPA. There's often 10-30 retransmissions during the
> test. Sometimes as many as 100. Set the retransmission threshold
> at 1/4th of the wire frame target.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net-next] selftests: drv-net: tso: increase the retransmit threshold
    https://git.kernel.org/netdev/net-next/c/eddc821f98af

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] 4+ messages in thread

end of thread, other threads:[~2025-08-20  1:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15 22:41 [PATCH net-next] selftests: drv-net: tso: increase the retransmit threshold Jakub Kicinski
2025-08-16  1:41 ` Daniel Zahka
2025-08-18 15:52   ` Jakub Kicinski
2025-08-20  1:00 ` 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).