| 764d0833 | 02-Apr-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: add a test for bad IPv4 csum
We have a test for coalescing with bad TCP checksum, let's also test bad IPv4 header checksum.
Reviewed-by: Willem de Bruijn <willemb@google.co
selftests: drv-net: gro: add a test for bad IPv4 csum
We have a test for coalescing with bad TCP checksum, let's also test bad IPv4 header checksum.
Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260402210000.1512696-9-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 9a84a404 | 02-Apr-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: test ip6ip6
We explicitly test ipip encap. Let's add ip6ip6, too. Having just ipip seems like favoring IPv4 which we should not do :) Testing all combinations is left for fu
selftests: drv-net: gro: test ip6ip6
We explicitly test ipip encap. Let's add ip6ip6, too. Having just ipip seems like favoring IPv4 which we should not do :) Testing all combinations is left for future work, not sure it's actually worth it.
Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260402210000.1512696-8-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 024597cc | 02-Apr-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: make large packet math more precise
When constructing the packets for large_* test cases we use a static value for packet count and MSS. It works okay for ipv4 vs ipv6 but t
selftests: drv-net: gro: make large packet math more precise
When constructing the packets for large_* test cases we use a static value for packet count and MSS. It works okay for ipv4 vs ipv6 but the gap between ipv4 and ip6ip6 is going to be quite significant.
Make the defines calculate the worst case values, those are only used for sizing stack arrays. Create helpers for calculating precise values based on the exact test case.
Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260402210000.1512696-7-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 166b0cc6 | 02-Apr-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: remove TOTAL_HDR_LEN
Willem points out TOTAL_HDR_LEN is identical to MAX_HDR_LEN. This seems to have been the case ever since the test was added. Replace the uses of TOTAL_H
selftests: drv-net: gro: remove TOTAL_HDR_LEN
Willem points out TOTAL_HDR_LEN is identical to MAX_HDR_LEN. This seems to have been the case ever since the test was added. Replace the uses of TOTAL_HDR_LEN with MAX_HDR_LEN, MAX seems more common for what this value is.
Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260402210000.1512696-6-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 5469b695 | 02-Apr-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: prepare for ip6ip6 support
Try to use already calculated offsets and not depend on the ipip flag as much. This patch should not change any functionality, it's just a cleanup
selftests: drv-net: gro: prepare for ip6ip6 support
Try to use already calculated offsets and not depend on the ipip flag as much. This patch should not change any functionality, it's just a cleanup to make ip6ip6 support easier.
Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260402210000.1512696-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| d9734847 | 02-Apr-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: always wait for FIN in the capacity test
The new capacity/order test exits as soon as it sees the expected packet sequence. This may allow the "flushing" FIN packet to spill
selftests: drv-net: gro: always wait for FIN in the capacity test
The new capacity/order test exits as soon as it sees the expected packet sequence. This may allow the "flushing" FIN packet to spill over to the next test. Let's always wait for the FIN before exiting.
Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260402210000.1512696-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 436ea8a1 | 02-Apr-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: add 1 byte payload test
Small IPv4 packets get padded to 60B, this may break / confuse some buggy implementations. Add a test to coalesce a 1B payload. Keep this separate fr
selftests: drv-net: gro: add 1 byte payload test
Small IPv4 packets get padded to 60B, this may break / confuse some buggy implementations. Add a test to coalesce a 1B payload. Keep this separate from the lrg_sml test because I suspect some implementations may not handle this case (treat padded frames as ineligible for coalescing).
Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260402210000.1512696-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| e3cdf6cf | 25-Mar-2026 |
Chris J Arges <carges@cloudflare.com> |
selftests: drv-net: xdp: Add rss_hash metadata tests
This test loads xdp_metadata.bpf which calls bpf_xdp_metadata_rx_hash() on incoming packets. The metadata from that packet is then sent to a BPF
selftests: drv-net: xdp: Add rss_hash metadata tests
This test loads xdp_metadata.bpf which calls bpf_xdp_metadata_rx_hash() on incoming packets. The metadata from that packet is then sent to a BPF map for validation. It borrows structure from xdp.py, reusing common functions.
The test checks the device's xdp-rx-metadata-features via netlink before running and skips on devices that do not advertise hash support. This can be run on veth devices as well as real hardware.
The test is fairly simple and just verifies that a TCP or UDP packet can be identified as an L4 flow. This minimal test also passes if run on a veth device.
Signed-off-by: Chris J Arges <carges@cloudflare.com> Link: https://patch.msgid.link/20260325201139.2501937-7-carges@cloudflare.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| ba5d4128 | 18-Mar-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: test GRO stats
Test accuracy of GRO stats. We want to cover two potentially tricky cases: - single segment GRO - packets which were eligible but didn't get GRO'd
The firs
selftests: drv-net: gro: test GRO stats
Test accuracy of GRO stats. We want to cover two potentially tricky cases: - single segment GRO - packets which were eligible but didn't get GRO'd
The first case is trivial, teach gro.c to send one packet, and check GRO stats didn't move.
Second case requires gro.c to send a lot of flows expecting the NIC to run out of GRO flow capacity.
To avoid system traffic noise we steer the packets to a dedicated queue and operate on qstat.
Link: https://patch.msgid.link/20260318033819.1469350-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| f26d43ac | 18-Mar-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: drv-net: gro: use SO_TXTIME to schedule packets together
Longer packet sequence tests are quite flaky when the test is run over a real network. Try to avoid at least the jitter on the sen
selftests: drv-net: gro: use SO_TXTIME to schedule packets together
Longer packet sequence tests are quite flaky when the test is run over a real network. Try to avoid at least the jitter on the sender side by scheduling all the packets to be sent at once using SO_TXTIME. Use hardcoded tx time of 5msec in the future. In my test increasing this time past 2msec makes no difference so 5msec is plenty of margin. Since we now expect more output buffering make sure to raise SNDBUF.
Note that this is an opportunistic reliability improvement which will only work if the qdisc can schedule Tx time for us (fq). Fiddling with qdisc config was deemed too complex, so it's not part of the patch.
Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Link: https://patch.msgid.link/20260318033819.1469350-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| f0bd1931 | 10-Mar-2026 |
Gal Pressman <gal@nvidia.com> |
selftests: net: fix timeout passed as positional argument to communicate()
The cited commit refactored the hardcoded timeout=5 into a parameter, but dropped the keyword from the communicate() call.
selftests: net: fix timeout passed as positional argument to communicate()
The cited commit refactored the hardcoded timeout=5 into a parameter, but dropped the keyword from the communicate() call. Since Popen.communicate()'s first positional argument is 'input' (not 'timeout'), the timeout value is silently treated as stdin input and the call never enforces a timeout.
Pass timeout as a keyword argument to restore the intended behavior.
Reviewed-by: Nimrod Oren <noren@nvidia.com> Signed-off-by: Gal Pressman <gal@nvidia.com> Link: https://patch.msgid.link/20260310115803.2521050-3-gal@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 6e4dff20 | 23-Feb-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: net: py: add cmd info for ksft_wait failure
Gal recently complained:
When [ksft_wait failure] happens, the test fails with a cryptic message: # Exception| Exception: Did not rece
selftests: net: py: add cmd info for ksft_wait failure
Gal recently complained:
When [ksft_wait failure] happens, the test fails with a cryptic message: # Exception| Exception: Did not receive ready message
Let's try to include the stdout/stderr of the command we tried to start. E.g. for cmd("false", ksft_wait=True):
# Exception| lib.py.utils.CmdInitFailure: Did not receive ready message # Exception| CMD: false # Exception| EXIT: 1
We need to factor out _process_terminate() otherwise the exit path may try to write to already disconnected self.ksft_term_fd.
Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260223202633.4126087-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|