selftests: packetdrill: correct the expected timing in tcp_rcv_big_endseqCommit f5fda1a86884 ("selftests/net: packetdrill: add tcp_rcv_big_endseq.pkt")added this test recently, but it's failing wi
selftests: packetdrill: correct the expected timing in tcp_rcv_big_endseqCommit f5fda1a86884 ("selftests/net: packetdrill: add tcp_rcv_big_endseq.pkt")added this test recently, but it's failing with: # tcp_rcv_big_endseq.pkt:41: error handling packet: timing error: expected outbound packet at 1.230105 sec but happened at 1.190101 sec; tolerance 0.005046 sec # script packet: 1.230105 . 1:1(0) ack 54001 win 0 # actual packet: 1.190101 . 1:1(0) ack 54001 win 0It's unclear why the test expects the ack to be delayed.Correct it.Link: https://patch.msgid.link/20250715142849.959444-1-kuba@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
selftests/net: packetdrill: add tcp_rcv_toobig.pktCheck that TCP receiver behavior after "tcp: stronger sk_rcvbuf checks"Too fat packet is dropped unless receive queue is empty.Signed-off-by: E
selftests/net: packetdrill: add tcp_rcv_toobig.pktCheck that TCP receiver behavior after "tcp: stronger sk_rcvbuf checks"Too fat packet is dropped unless receive queue is empty.Signed-off-by: Eric Dumazet <edumazet@google.com>Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>Link: https://patch.msgid.link/20250711114006.480026-9-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: add tcp_ooo_rcv_mss.pktWe make sure tcpi_rcv_mss and tp->scaling_ratioare correctly updated if no in-order packet has been received yet.Signed-off-by: Eric Dumazet <e
selftests/net: packetdrill: add tcp_ooo_rcv_mss.pktWe make sure tcpi_rcv_mss and tp->scaling_ratioare correctly updated if no in-order packet has been received yet.Signed-off-by: Eric Dumazet <edumazet@google.com>Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>Link: https://patch.msgid.link/20250711114006.480026-6-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: add tcp_rcv_big_endseq.pktThis test checks TCP behavior when receiving a packet beyond the window.It checks the new TcpExtBeyondWindow SNMP counter.Signed-off-by: Er
selftests/net: packetdrill: add tcp_rcv_big_endseq.pktThis test checks TCP behavior when receiving a packet beyond the window.It checks the new TcpExtBeyondWindow SNMP counter.Signed-off-by: Eric Dumazet <edumazet@google.com>Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>Link: https://patch.msgid.link/20250711114006.480026-4-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: add --mss option to three testsThree tests are cooking GSO packets but do not providegso_size information to the kernel, triggering this message:TCP: tun0: Driver has
selftests/net: packetdrill: add --mss option to three testsThree tests are cooking GSO packets but do not providegso_size information to the kernel, triggering this message:TCP: tun0: Driver has suspect GRO implementation, TCP performance may be compromised.Add --mss option to avoid this warning.Signed-off-by: Eric Dumazet <edumazet@google.com>Reviewed-by: Willem de Bruijn <willemb@google.com>Link: https://patch.msgid.link/20250710155641.3028726-1-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netCross-merge networking fixes after downstream PR (net-6.16-rc6).No conflicts.Adjacent changes:Documentation/devicetree/bindings/n
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netCross-merge networking fixes after downstream PR (net-6.16-rc6).No conflicts.Adjacent changes:Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml 0a12c435a1d6 ("dt-bindings: net: sun8i-emac: Add A100 EMAC compatible") b3603c0466a8 ("dt-bindings: net: sun8i-emac: Rename A523 EMAC0 to GMAC0")Signed-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: add tcp_ooo-before-and-after-accept.pktTest how new passive flows react to ooo incoming packets.Their sk_rcvbuf can increase only after accept().Signed-off-by: Eric
selftests/net: packetdrill: add tcp_ooo-before-and-after-accept.pktTest how new passive flows react to ooo incoming packets.Their sk_rcvbuf can increase only after accept().Signed-off-by: Eric Dumazet <edumazet@google.com>Link: https://patch.msgid.link/20250707213900.1543248-3-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: add tcp_dsack_mult.pktTest DSACK behavior with non contiguous ranges.Without prior fix (tcp: fix tcp_ofo_queue() to avoid includingtoo much DUP SACK range) this would
selftests/net: packetdrill: add tcp_dsack_mult.pktTest DSACK behavior with non contiguous ranges.Without prior fix (tcp: fix tcp_ofo_queue() to avoid includingtoo much DUP SACK range) this would fail with:tcp_dsack_mult.pkt:37: error handling packet: bad value outbound TCP option 5script packet: 0.100682 . 1:1(0) ack 6001 <nop,nop,sack 1001:3001 7001:8001>actual packet: 0.100679 . 1:1(0) ack 6001 win 1097 <nop,nop,sack 1001:6001 7001:8001>Signed-off-by: Eric Dumazet <edumazet@google.com>Cc: xin.guo <guoxin0309@gmail.com>Link: https://patch.msgid.link/20250626123420.1933835-3-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: more xfail changesMost of the packetdrill tests have not flaked once last week.Add the few which did to the XFAIL list.Acked-by: Matthieu Baerts (NGI0) <matttbe@kerne
selftests/net: packetdrill: more xfail changesMost of the packetdrill tests have not flaked once last week.Add the few which did to the XFAIL list.Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>Reviewed-by: Willem de Bruijn <willemb@google.com>Link: https://patch.msgid.link/20250610000001.1970934-1-kuba@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: more xfail changes (and a correction)Recent change to add more cases to XFAIL has a broken regex,the matching needs a real regex not a glob pattern.While at it add th
selftests/net: packetdrill: more xfail changes (and a correction)Recent change to add more cases to XFAIL has a broken regex,the matching needs a real regex not a glob pattern.While at it add the cases Willem pointed out during review.Fixes: 3030e3d57ba8 ("selftests/net: packetdrill: make tcp buf limited timing tests benign")Reviewed-by: Willem de Bruijn <willemb@google.com>Link: https://patch.msgid.link/20250121143423.215261-1-kuba@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: make tcp buf limited timing tests benignThe following tests are failing on debug kernels: tcp_tcp_info_tcp-info-rwnd-limited.pkt tcp_tcp_info_tcp-info-sndbuf-limite
selftests/net: packetdrill: make tcp buf limited timing tests benignThe following tests are failing on debug kernels: tcp_tcp_info_tcp-info-rwnd-limited.pkt tcp_tcp_info_tcp-info-sndbuf-limited.pktwith reports like: assert 19000 <= tcpi_sndbuf_limited <= 21000, tcpi_sndbuf_limited; \ AssertionError: 18000and: assert 348000 <= tcpi_busy_time <= 360000, tcpi_busy_time AssertionError: 362000Extend commit 912d6f669725 ("selftests/net: packetdrill: report benigndebug flakes as xfail") to cover them.Reviewed-by: Willem de Bruijn <willemb@google.com>Link: https://patch.msgid.link/20250115232129.845884-1-kuba@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: report benign debug flakes as xfailA few recently added packetdrill tests that are known time sensitive(e.g., because testing timestamping) occasionally fail in debug m
selftests/net: packetdrill: report benign debug flakes as xfailA few recently added packetdrill tests that are known time sensitive(e.g., because testing timestamping) occasionally fail in debug mode:https://netdev.bots.linux.dev/contest.html?executor=vmksft-packetdrill-dbgThese failures are well understood. Correctness of the tests isverified in non-debug mode. Continue running in debug mode also, tokeep coverage with debug instrumentation.But, only in debug mode, mark these tests with well understoodtiming issues as XFAIL (known failing) rather than FAIL when failing.Introduce an allow list xfail_list with known cases.Expand the ktap infrastructure with XFAIL support.Fixes: eab35989cc37 ("selftests/net: packetdrill: import tcp/fast_recovery, tcp/nagle, tcp/timestamping")Reported-by: Jakub Kicinski <kuba@kernel.org>Closes: https://lore.kernel.org/netdev/20241218100013.0c698629@kernel.org/Signed-off-by: Willem de Bruijn <willemb@google.com>Link: https://patch.msgid.link/20250103113142.129251-1-willemdebruijn.kernel@gmail.comSigned-off-by: Paolo Abeni <pabeni@redhat.com>
selftests/net: packetdrill: import tcp/user_timeout, tcp/validate, tcp/sendfile, tcp/limited-transmit, tcp/syscall_bad_argUse the standard import and testing method, as described in theimport of t
selftests/net: packetdrill: import tcp/user_timeout, tcp/validate, tcp/sendfile, tcp/limited-transmit, tcp/syscall_bad_argUse the standard import and testing method, as described in theimport of tcp/ecn and tcp/close , tcp/sack , tcp/tcp_info.Signed-off-by: Willem de Bruijn <willemb@google.com>Signed-off-by: Soham Chakradeo <sohamch@google.com>Link: https://patch.msgid.link/20241217185203.297935-5-sohamch.kernel@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: import tcp/eor, tcp/splice, tcp/ts_recent, tcp/blockingUse the standard import and testing method, as described in theimport of tcp/ecn and tcp/close , tcp/sack , tcp/t
selftests/net: packetdrill: import tcp/eor, tcp/splice, tcp/ts_recent, tcp/blockingUse the standard import and testing method, as described in theimport of tcp/ecn and tcp/close , tcp/sack , tcp/tcp_info.Signed-off-by: Willem de Bruijn <willemb@google.com>Signed-off-by: Soham Chakradeo <sohamch@google.com>Link: https://patch.msgid.link/20241217185203.297935-4-sohamch.kernel@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: import tcp/fast_recovery, tcp/nagle, tcp/timestampingUse the standard import and testing method, as described in theimport of tcp/ecn , tcp/close , tcp/sack , tcp/tcp_i
selftests/net: packetdrill: import tcp/fast_recovery, tcp/nagle, tcp/timestampingUse the standard import and testing method, as described in theimport of tcp/ecn , tcp/close , tcp/sack , tcp/tcp_info.Signed-off-by: Willem de Bruijn <willemb@google.com>Signed-off-by: Soham Chakradeo <sohamch@google.com>Link: https://patch.msgid.link/20241217185203.297935-3-sohamch.kernel@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: import tcp/ecn, tcp/close, tcp/sack, tcp/tcp_infoSame as initial tests, import verbatim fromgithub.com/google/packetdrill, aside from:- update `source ./defaults.sh`
selftests/net: packetdrill: import tcp/ecn, tcp/close, tcp/sack, tcp/tcp_infoSame as initial tests, import verbatim fromgithub.com/google/packetdrill, aside from:- update `source ./defaults.sh` path to adjust for flat dir- add SPDX headers- remove author statements if any- drop blank lines at EOFSame test process as previous tests. Both with and without debug mode.Recording the steps once:make mrpropervng --build \--config tools/testing/selftests/net/packetdrill/config \--config kernel/configs/debug.configvng -v --run . --user root --cpus 4 -- \make -C tools/testing/selftests TARGETS=net/packetdrill run_testsSigned-off-by: Willem de Bruijn <willemb@google.com>Signed-off-by: Soham Chakradeo <sohamch@google.com>Link: https://patch.msgid.link/20241217185203.297935-2-sohamch.kernel@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: increase timing tolerance in debug modeSome packetdrill tests are flaky in debug mode. As discussed, increasetolerance.We have been doing this for debug builds outsid
selftests/net: packetdrill: increase timing tolerance in debug modeSome packetdrill tests are flaky in debug mode. As discussed, increasetolerance.We have been doing this for debug builds outside ksft too.Previous setting was 10000. A manual 50 runs in virtme-ng showed twofailures that needed 12000. To be on the safe side, Increase to 14000.Link: https://lore.kernel.org/netdev/Zuhhe4-MQHd3EkfN@mini-arch/Fixes: 1e42f73fd3c2 ("selftests/net: packetdrill: import tcp/zerocopy")Reported-by: Stanislav Fomichev <sdf@fomichev.me>Signed-off-by: Willem de Bruijn <willemb@google.com>Reviewed-by: Simon Horman <horms@kernel.org>Acked-by: Stanislav Fomichev <sdf@fomichev.me>Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>Link: https://patch.msgid.link/20240919124412.3014326-1-willemdebruijn.kernel@gmail.comSigned-off-by: Paolo Abeni <pabeni@redhat.com>
selftests/net: packetdrill: import tcp/slow_startSame import process as previous tests.Also add CONFIG_NET_SCH_FQ to config, as one test uses that.Same test process as previous tests. Both with
selftests/net: packetdrill: import tcp/slow_startSame import process as previous tests.Also add CONFIG_NET_SCH_FQ to config, as one test uses that.Same test process as previous tests. Both with and without debug mode.Recording the steps once:make mrpropervng --build \ --config tools/testing/selftests/net/packetdrill/config \ --config kernel/configs/debug.configvng -v --run . --user root --cpus 4 -- \ make -C tools/testing/selftests TARGETS=net/packetdrill run_testsLink: https://github.com/linux-netdev/nipa/wiki/How-to-run-netdev-selftests-CI-style#how-to-buildSigned-off-by: Willem de Bruijn <willemb@google.com>Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>Link: https://patch.msgid.link/20240912005317.1253001-4-willemdebruijn.kernel@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: import tcp/zerocopySame as initial tests, import verbatim fromgithub.com/google/packetdrill, aside from:- update `source ./defaults.sh` path to adjust for flat dir-
selftests/net: packetdrill: import tcp/zerocopySame as initial tests, import verbatim fromgithub.com/google/packetdrill, aside from:- update `source ./defaults.sh` path to adjust for flat dir- add SPDX headers- remove author statements if any- drop blank lines at EOF (new)Also import set_sysctls.py, which many scripts depend on to setsysctls and then restore them later. This is no longer strictly neededfor namespacified sysctl. But not all sysctls are namespacified, anddoesn't hurt if they are.Signed-off-by: Willem de Bruijn <willemb@google.com>Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>Link: https://patch.msgid.link/20240912005317.1253001-3-willemdebruijn.kernel@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: packetdrill: run in netns and expand configRun packetdrill tests inside netns.They may change system settings, such as sysctl.Also expand config with a few more needed CONFIGs.L
selftests/net: packetdrill: run in netns and expand configRun packetdrill tests inside netns.They may change system settings, such as sysctl.Also expand config with a few more needed CONFIGs.Link: https://lore.kernel.org/netdev/20240910152640.429920be@kernel.org/Signed-off-by: Willem de Bruijn <willemb@google.com>Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>Link: https://patch.msgid.link/20240912005317.1253001-2-willemdebruijn.kernel@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/net: integrate packetdrill with ksftLay the groundwork to import into kselftests the over 150 packetdrillTCP/IP conformance tests on github.com/google/packetdrill.Florian recently adde
selftests/net: integrate packetdrill with ksftLay the groundwork to import into kselftests the over 150 packetdrillTCP/IP conformance tests on github.com/google/packetdrill.Florian recently added support for packetdrill tests in nf_conntrack,in commit a8a388c2aae49 ("selftests: netfilter: add packetdrill basedconntrack tests").This patch takes a slightly different approach. It relies onksft_runner.sh to run every *.pkt file in the directory.Any future imports of packetdrill tests should require no additionalcoding. Just add the *.pkt files.Initially import only two features/directories from github. One with asingle script, and one with two. This was the only reason to picktcp/inq and tcp/md5.The path replaces the directory hierarchy in github with a flat spaceof files: $(subst /,_,$(wildcard tcp/**/*.pkt)). This is the moststraightforward option to integrate with kselftests. The Linked threadreviewed two ways to maintain the hierarchy: TEST_PROGS_RECURSE andPRESERVE_TEST_DIRS. But both introduce significant changes tokselftest infra and with that risk to existing tests.Implementation notes:- restore alphabetical order when adding the new directory to tools/testing/selftests/Makefile- imported *.pkt files and support verbatim from the github project, except for - update `source ./defaults.sh` path (to adjust for flat dir) - add SPDX headers - remove one author statement - Acknowledgment: drop an e (checkpatch)Tested: make -C tools/testing/selftests \ TARGETS=net/packetdrill \ run_tests make -C tools/testing/selftests \ TARGETS=net/packetdrill \ install INSTALL_PATH=$KSFT_INSTALL_PATH # in virtme-ng ./run_kselftest.sh -c net/packetdrill ./run_kselftest.sh -t net/packetdrill:tcp_inq_client.pktLink: https://lore.kernel.org/netdev/20240827193417.2792223-1-willemdebruijn.kernel@gmail.com/Signed-off-by: Willem de Bruijn <willemb@google.com>Link: https://patch.msgid.link/20240905231653.2427327-3-willemdebruijn.kernel@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>