netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 0/4] net: fix passive TFO socket having invalid NAPI ID
@ 2025-06-17 21:20 David Wei
  2025-06-17 21:20 ` [PATCH net v2 1/4] selftests: netdevsim: improve lib.sh include in peer.sh David Wei
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: David Wei @ 2025-06-17 21:20 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.

Changes in v2:
--------------
* Use sk_mark_napi_id_set() instead
* Add fixes tag to patch 4

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] 8+ messages in thread

end of thread, other threads:[~2025-06-19  2:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-17 21:20 [PATCH net v2 0/4] net: fix passive TFO socket having invalid NAPI ID David Wei
2025-06-17 21:20 ` [PATCH net v2 1/4] selftests: netdevsim: improve lib.sh include in peer.sh David Wei
2025-06-17 21:21 ` [PATCH net v2 2/4] selftests: net: add passive TFO test binary David Wei
2025-06-17 21:21 ` [PATCH net v2 3/4] selftests: net: add test for passive TFO socket NAPI ID David Wei
2025-06-17 21:21 ` [PATCH net v2 4/4] tcp: fix passive TFO socket having invalid " David Wei
2025-06-17 21:29   ` Kuniyuki Iwashima
2025-06-18  8:11     ` Eric Dumazet
2025-06-19  2:20 ` [PATCH net v2 0/4] net: " 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).