netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 00/13] selftest: packetdrill: Import TFO server tests.
@ 2025-09-27 21:29 Kuniyuki Iwashima
  2025-09-27 21:29 ` [PATCH v2 net-next 01/13] selftest: packetdrill: Set ktap_set_plan properly for single protocol test Kuniyuki Iwashima
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: Kuniyuki Iwashima @ 2025-09-27 21:29 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

The series imports 15 TFO server tests from google/packetdrill and
adds 2 more tests.

The repository has two versions of tests for most scenarios; one uses
the non-experimental option (34), and the other uses the experimental
option (255) with 0xF989.

Basically, we only import the non-experimental version of tests, and
for the experimental option, tcp_fastopen_server_experimental_option.pkt
is added.


The following tests are not (yet) imported:

  * icmp-baseline.pkt
  * simple1.pkt / simple2.pkt / simple3.pkt

The former is completely covered by icmp-before-accept.pkt.

The later's delta is the src/dst IP pair to generate a different
cookie, but supporting dualstack requires churn in ksft_runner.sh,
so defered to future series.  Also, sockopt-fastopen-key.pkt covers
the same function.


The following tests have the experimental version only, so converted
to the non-experimental option:

  * client-ack-dropped-then-recovery-ms-timestamps.pkt
  * sockopt-fastopen-key.pkt


For the imported tests, these common changes are applied.

  * Add SPDX header
  * Adjust path to default.sh
  * Adjust sysctl w/ set_sysctls.py
  * Use TFO_COOKIE instead of a raw hex value
  * Use SOCK_NONBLOCK for socket() not to block accept()
  * Add assertions for TCP state if commented
  * Remove unnecessary delay (e.g. +0.1 setsockopt(SO_REUSEADDR), etc)


With this series, except for simple{1,2,3}.pkt, we can remove TFO server
tests in google/packetdrill.


Changes:
  v2:
    * Add patch 1 for icmp-before-accept.pkt.
    * Patch 2:
      * Keep TFO_CLIENT_ENABLE for
        tcp_syscall_bad_arg_fastopen-invalid-buf-ptr.pkt.

  v1: https://lore.kernel.org/netdev/20250926212929.1469257-1-kuniyu@google.com/


Kuniyuki Iwashima (13):
  selftest: packetdrill: Set ktap_set_plan properly for single protocol
    test.
  selftest: packetdrill: Require explicit setsockopt(TCP_FASTOPEN).
  selftest: packetdrill: Define common TCP Fast Open cookie.
  selftest: packetdrill: Import TFO server basic tests.
  selftest: packetdrill: Add test for TFO_SERVER_WO_SOCKOPT1.
  selftest: packetdrill: Add test for experimental option.
  selftest: packetdrill: Import opt34/fin-close-socket.pkt.
  selftest: packetdrill: Import opt34/icmp-before-accept.pkt.
  selftest: packetdrill: Import opt34/reset-* tests.
  selftest: packetdrill: Import opt34/*-trigger-rst.pkt.
  selftest: packetdrill: Refine
    tcp_fastopen_server_reset-after-disconnect.pkt.
  selftest: packetdrill: Import sockopt-fastopen-key.pkt
  selftest: packetdrill: Import
    client-ack-dropped-then-recovery-ms-timestamps.pkt

 .../selftests/net/packetdrill/defaults.sh     |  3 +-
 .../selftests/net/packetdrill/ksft_runner.sh  |  8 +-
 ..._fastopen_server_basic-cookie-not-reqd.pkt | 32 ++++++++
 ...cp_fastopen_server_basic-no-setsockopt.pkt | 21 ++++++
 ...fastopen_server_basic-non-tfo-listener.pkt | 26 +++++++
 ...cp_fastopen_server_basic-pure-syn-data.pkt | 50 +++++++++++++
 .../tcp_fastopen_server_basic-rw.pkt          | 23 ++++++
 ...tcp_fastopen_server_basic-zero-payload.pkt | 26 +++++++
 ...ck-dropped-then-recovery-ms-timestamps.pkt | 46 ++++++++++++
 ...cp_fastopen_server_experimental_option.pkt | 37 ++++++++++
 .../tcp_fastopen_server_fin-close-socket.pkt  | 30 ++++++++
 ...tcp_fastopen_server_icmp-before-accept.pkt | 49 ++++++++++++
 ...tcp_fastopen_server_reset-after-accept.pkt | 37 ++++++++++
 ...cp_fastopen_server_reset-before-accept.pkt | 32 ++++++++
 ...en_server_reset-close-with-unread-data.pkt | 32 ++++++++
 ...p_fastopen_server_reset-non-tfo-socket.pkt | 37 ++++++++++
 ...p_fastopen_server_sockopt-fastopen-key.pkt | 74 +++++++++++++++++++
 ...pen_server_trigger-rst-listener-closed.pkt | 21 ++++++
 ...fastopen_server_trigger-rst-reconnect.pkt} | 10 ++-
 ..._server_trigger-rst-unread-data-closed.pkt | 23 ++++++
 20 files changed, 611 insertions(+), 6 deletions(-)
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_basic-cookie-not-reqd.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_basic-no-setsockopt.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_basic-non-tfo-listener.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_basic-pure-syn-data.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_basic-rw.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_basic-zero-payload.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_client-ack-dropped-then-recovery-ms-timestamps.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_experimental_option.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_fin-close-socket.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_icmp-before-accept.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_reset-after-accept.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_reset-before-accept.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_reset-close-with-unread-data.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_reset-non-tfo-socket.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_sockopt-fastopen-key.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_trigger-rst-listener-closed.pkt
 rename tools/testing/selftests/net/packetdrill/{tcp_fastopen_server_reset-after-disconnect.pkt => tcp_fastopen_server_trigger-rst-reconnect.pkt} (66%)
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_trigger-rst-unread-data-closed.pkt

-- 
2.51.0.536.g15c5d4f767-goog


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

end of thread, other threads:[~2025-09-30  1:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-27 21:29 [PATCH v2 net-next 00/13] selftest: packetdrill: Import TFO server tests Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 01/13] selftest: packetdrill: Set ktap_set_plan properly for single protocol test Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 02/13] selftest: packetdrill: Require explicit setsockopt(TCP_FASTOPEN) Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 03/13] selftest: packetdrill: Define common TCP Fast Open cookie Kuniyuki Iwashima
2025-09-28 18:10   ` Willem de Bruijn
2025-09-28 19:12     ` Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 04/13] selftest: packetdrill: Import TFO server basic tests Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 05/13] selftest: packetdrill: Add test for TFO_SERVER_WO_SOCKOPT1 Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 06/13] selftest: packetdrill: Add test for experimental option Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 07/13] selftest: packetdrill: Import opt34/fin-close-socket.pkt Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 08/13] selftest: packetdrill: Import opt34/icmp-before-accept.pkt Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 09/13] selftest: packetdrill: Import opt34/reset-* tests Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 10/13] selftest: packetdrill: Import opt34/*-trigger-rst.pkt Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 11/13] selftest: packetdrill: Refine tcp_fastopen_server_reset-after-disconnect.pkt Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 12/13] selftest: packetdrill: Import sockopt-fastopen-key.pkt Kuniyuki Iwashima
2025-09-27 21:29 ` [PATCH v2 net-next 13/13] selftest: packetdrill: Import client-ack-dropped-then-recovery-ms-timestamps.pkt Kuniyuki Iwashima
2025-09-28 18:09 ` [PATCH v2 net-next 00/13] selftest: packetdrill: Import TFO server tests Willem de Bruijn
2025-09-30  1:50 ` 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).