]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: drv-net: gro: signal over-coalescing more reliably
authorJakub Kicinski <kuba@kernel.org>
Sun, 7 Jun 2026 00:24:01 +0000 (17:24 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 9 Jun 2026 10:24:04 +0000 (12:24 +0200)
commit69a4e74e4cc46bdc65586f600b8552cc10a2811a
treed3731f557fa9301aeacb19691fba2aa4046018be
parent06528596662bf9a34d3691eb5b00bc39b228c994
selftests: drv-net: gro: signal over-coalescing more reliably

GRO test is very timing-sensitive, packets may be delayed
by the network or just sent slowly. Because of this we retry
each test case up to 6 times.

This makes perfect sense for positive cases, in which we want
to see coalescing. Negative test cases, which modify headers
and expect no coalescing should have opposite treatment.
We should really try 6 times and make sure that each time
the test failed. This would, however, require that we annotate
each test to indicate whether its positive or negative.
Let's start with a simpler improvement. Do not allow
retries if we detected over-coalescing. Previously the negative
case would have to get lucky at least once in 6 tries to pass.
Now the first failure breaks the retry loop.

For background - NICs tend to ignore the contents of the TCP
timestamp option, so that test case commonly fails. In NIPA
having 6 attempts, however, was enough for some NICs to get
multiple successful runs in a row, getting the test cases
auto-classified as expected to pass, even tho the NIC does
not comply with the expectations.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260607002401.212976-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/drivers/net/gro.py
tools/testing/selftests/net/lib/gro.c