<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/net/setup_veth.sh, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-11-21T02:19:29Z</updated>
<entry>
<title>selftests: net: relocate gro and toeplitz tests to drivers/net</title>
<updated>2025-11-21T02:19:29Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-11-20T02:10:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=89268f7dbca1842cd38d3a4578ba7e3b6789c5ad'/>
<id>urn:sha1:89268f7dbca1842cd38d3a4578ba7e3b6789c5ad</id>
<content type='text'>
The GRO test can run on a real device or a veth.
The Toeplitz hash test can only run on a real device.
Move them from net/ to drivers/net/ and drivers/net/hw/ respectively.

There are two scripts which set up the environment for these tests
setup_loopback.sh and setup_veth.sh. Move those scripts to net/lib.
The paths to the setup files are a little ugly but they will be
deleted shortly.

toeplitz_client.sh is not a test in itself, but rather a helper
to send traffic, so add it to TEST_FILES rather than TEST_PROGS.

Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Link: https://patch.msgid.link/20251120021024.2944527-6-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: net: bump GRO timeout for gro/setup_veth</title>
<updated>2025-03-12T20:20:04Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-03-10T11:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=188107b2c403b593439ad5b74baed5fefa638df4'/>
<id>urn:sha1:188107b2c403b593439ad5b74baed5fefa638df4</id>
<content type='text'>
Commit 51bef03e1a71 ("selftests/net: deflake GRO tests") recently
switched to NAPI suspension, and lowered the timeout from 1ms to 100us.
This started causing flakes in netdev-run CI. Let's bump it to 200us.
In a quick test of a debug kernel I see failures with 100us, with 200us
in 5 runs I see 2 completely clean runs and 3 with a single retry
(GRO test will retry up to 5 times).

Reviewed-by: Kevin Krakauer &lt;krakauer@google.com&gt;
Link: https://patch.msgid.link/20250310110821.385621-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/net: deflake GRO tests</title>
<updated>2025-02-28T02:38:23Z</updated>
<author>
<name>Kevin Krakauer</name>
<email>krakauer@google.com</email>
</author>
<published>2025-02-26T19:27:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51bef03e1a71a27f2bc25c9739992d472830c83c'/>
<id>urn:sha1:51bef03e1a71a27f2bc25c9739992d472830c83c</id>
<content type='text'>
GRO tests are timing dependent and can easily flake. This is partially
mitigated in gro.sh by giving each subtest 3 chances to pass. However,
this still flakes on some machines. Reduce the flakiness by:

- Bumping retries to 6.
- Setting napi_defer_hard_irqs to 1 to reduce the chance that GRO is
  flushed prematurely. This also lets us reduce the gro_flush_timeout
  from 1ms to 100us.

Tested: Ran `gro.sh -t large` 1000 times. There were no failures with
this change. Ran inside strace to increase flakiness.

Signed-off-by: Kevin Krakauer &lt;krakauer@google.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Link: https://patch.msgid.link/20250226192725.621969-4-krakauer@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: net: give more time for GRO aggregation</title>
<updated>2024-01-26T22:11:57Z</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2024-01-25T18:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=89abe628375301fedb68770644df845d49018d8b'/>
<id>urn:sha1:89abe628375301fedb68770644df845d49018d8b</id>
<content type='text'>
The gro.sh test-case relay on the gro_flush_timeout to ensure
that all the segments belonging to any given batch are properly
aggregated.

The other end, the sender is a user-space program transmitting
each packet with a separate write syscall. A busy host and/or
stracing the sender program can make the relevant segments reach
the GRO engine after the flush timeout triggers.

Give the GRO flush timeout more slack, to avoid sporadic self-tests
failures.

Fixes: 9af771d2ec04 ("selftests/net: allow GRO coalesce test on veth")
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Tested-by: Eric Dumazet &lt;edumazet@google.com&gt;
Link: https://lore.kernel.org/r/bffec2beab3a5672dd13ecabe4fad81d2155b367.1706206101.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/net: use unique netns name for setup_loopback.sh setup_veth.sh</title>
<updated>2023-12-23T00:26:32Z</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2023-12-19T09:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4416c5f53b439cec05a9ec88af71cb2e64a1e9aa'/>
<id>urn:sha1:4416c5f53b439cec05a9ec88af71cb2e64a1e9aa</id>
<content type='text'>
The setup_loopback and setup_veth use their own way to create namespace.
So let's just re-define server_ns/client_ns to unique name.
At the same time update the namespace name in gro.sh and toeplitz.sh.
As I don't have env to run toeplitz.sh. Here is only the gro test result.

 # ./gro.sh
 running test ipv4 data
 Expected {200 }, Total 1 packets
 Received {200 }, Total 1 packets.
 ...
 Gro::large test passed.
 All Tests Succeeded!

Acked-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/net: allow GRO coalesce test on veth</title>
<updated>2021-08-26T11:03:49Z</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2021-08-26T07:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9af771d2ec044ffc19192711ac29f1d5c31dc181'/>
<id>urn:sha1:9af771d2ec044ffc19192711ac29f1d5c31dc181</id>
<content type='text'>
This change extends the existing GRO coalesce test to
allow running on top of a veth pair, so that no H/W dep
is required to run them.

By default gro.sh will use the veth backend, and will try
to use exiting H/W in loopback mode if a specific device
name is provided with the '-i' command line option.

No functional change is intended for the loopback-based
tests, just move all the relevant initialization/cleanup
code into the related script.

Introduces a new initialization helper script for the
veth backend, and plugs the correct helper script according
to the provided command line.

Additionally, enable veth-based tests by default.

v1 -&gt; v2:
  - drop unused code in setup_veth_ns() - Willem

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
