netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v1 0/4] net: fix passive TFO socket having invalid NAPI ID
@ 2025-06-16 18:54 David Wei
  2025-06-16 18:54 ` [PATCH net v1 1/4] selftests: netdevsim: improve lib.sh include in peer.sh David Wei
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: David Wei @ 2025-06-16 18:54 UTC (permalink / raw)
  To: netdev
  Cc: Eric Dumazet, Neal Cardwell, Kuniyuki Iwashima, David S. Miller,
	David Ahern, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Andrew Lunn, Shuah Khan

Found a bug where an accepted passive TFO socket returns an invalid NAPI
ID (i.e. 0) from SO_INCOMING_NAPI_ID. Add a selftest for this using
netdevsim and fix the bug.

Patch 1 is a drive-by fix for the lib.sh include in an existing
drivers/net/netdevsim/peer.sh selftest.

Patch 2 adds a test binary for a simple TFO server/client.

Patch 3 adds a selftest for checking that the NAPI ID of a passive TFO
socket is valid. This will currently fail.

Patch 4 adds a fix for the bug.

David Wei (4):
  selftests: netdevsim: improve lib.sh include in peer.sh
  selftests: net: add passive TFO test binary
  selftests: net: add test for passive TFO socket NAPI ID
  tcp: fix passive TFO socket having invalid NAPI ID

 net/ipv4/tcp_fastopen.c                       |   3 +
 .../selftests/drivers/net/netdevsim/peer.sh   |   3 +-
 tools/testing/selftests/net/.gitignore        |   1 +
 tools/testing/selftests/net/Makefile          |   2 +
 tools/testing/selftests/net/tfo.c             | 171 ++++++++++++++++++
 tools/testing/selftests/net/tfo_passive.sh    | 112 ++++++++++++
 6 files changed, 291 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/net/tfo.c
 create mode 100755 tools/testing/selftests/net/tfo_passive.sh

-- 
2.47.1


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

end of thread, other threads:[~2025-06-17  9:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 18:54 [PATCH net v1 0/4] net: fix passive TFO socket having invalid NAPI ID David Wei
2025-06-16 18:54 ` [PATCH net v1 1/4] selftests: netdevsim: improve lib.sh include in peer.sh David Wei
2025-06-16 18:54 ` [PATCH net v1 2/4] selftests: net: add passive TFO test binary David Wei
2025-06-16 18:54 ` [PATCH net v1 3/4] selftests: net: add test for passive TFO socket NAPI ID David Wei
2025-06-16 20:13   ` Jakub Kicinski
2025-06-17  0:02     ` David Wei
2025-06-16 18:54 ` [PATCH net v1 4/4] tcp: fix passive TFO socket having invalid " David Wei
2025-06-16 19:44   ` Kuniyuki Iwashima
2025-06-16 22:37     ` David Wei
2025-06-16 23:05       ` Kuniyuki Iwashima
2025-06-17  0:04         ` David Wei
2025-06-17  9:28           ` Eric Dumazet

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).