linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] tcp: support preloading data on a listening socket
@ 2025-05-16 15:54 Jeremy Harris
  2025-05-16 15:54 ` [PATCH 1/6] tcp: support writing to a socket in listening state Jeremy Harris
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Jeremy Harris @ 2025-05-16 15:54 UTC (permalink / raw)
  To: netdev; +Cc: linux-api, edumazet, ncardwell, Jeremy Harris

Support write to a listen TCP socket, for immediate
transmission on passive connection establishments.

On a normal connection transmission is triggered by the receipt of
the 3rd-ack. On a fastopen (with accepted cookie) connection the data
is sent in the synack packet.

The data preload is done using a sendmsg with a newly-defined flag
(MSG_PRELOAD); the amount of data limited to a single linear sk_buff.
Note that this definition is the last-but-two bit available if "int"
is 32 bits.

Testing:

A) packetdrill scripts for
   - normal non-TFO
   - normal TFO
   - synack lost
   - 3rd-ack acks only the SYN
   - 3rd-ack acks partial data
     (NB: packetdrill can only check the data size, not actual content)

B) Application use, running the application testsuite
   and manual check of specific cases via packet capture

C) Daily-driver laptop use (not expected to trigger the feature;
   only regression-test)

Jeremy Harris (6):
  tcp: support writing to a socket in listening state
  tcp: copy write-data from listen socket to accept child socket
  tcp: fastopen: add write-data to fastopen synack packet
  tcp: transmit any pending data on receipt of 3rd-ack
  tcp: fastopen: retransmit data when only the SYN of a synack-with-data
    is acked
  tcp: fastopen: extend retransmit-queue trimming to handle linear
    sk_buff

 include/linux/socket.h                        |  1 +
 net/ipv4/tcp.c                                | 17 ++++--
 net/ipv4/tcp_fastopen.c                       |  3 +-
 net/ipv4/tcp_input.c                          | 15 ++++-
 net/ipv4/tcp_ipv4.c                           |  4 +-
 net/ipv4/tcp_minisocks.c                      | 58 +++++++++++++++++--
 net/ipv4/tcp_output.c                         | 50 ++++++++++++++--
 .../perf/trace/beauty/include/linux/socket.h  |  1 +
 tools/perf/trace/beauty/msg_flags.c           |  3 +
 9 files changed, 135 insertions(+), 17 deletions(-)


base-commit: 2da35e4b4df99d3dd29bacf0c054e6988013d4ec
-- 
2.49.0


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

end of thread, other threads:[~2025-05-16 20:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16 15:54 [PATCH 0/6] tcp: support preloading data on a listening socket Jeremy Harris
2025-05-16 15:54 ` [PATCH 1/6] tcp: support writing to a socket in listening state Jeremy Harris
2025-05-16 15:55 ` [PATCH 2/6] tcp: copy write-data from listen socket to accept child socket Jeremy Harris
2025-05-16 17:51   ` Eric Dumazet
2025-05-16 20:11     ` Jeremy Harris
2025-05-16 15:55 ` [PATCH 3/6] tcp: fastopen: add write-data to fastopen synack packet Jeremy Harris
2025-05-16 15:55 ` [PATCH 4/6] tcp: transmit any pending data on receipt of 3rd-ack Jeremy Harris
2025-05-16 15:55 ` [PATCH 5/6] tcp: fastopen: retransmit data when only the SYN of a synack-with-data is acked Jeremy Harris
2025-05-16 15:55 ` [PATCH 6/6] tcp: fastopen: extend retransmit-queue trimming to handle linear sk_buff Jeremy Harris
2025-05-16 16:58 ` [PATCH 0/6] tcp: support preloading data on a listening socket Jeremy Harris
2025-05-16 18:19 ` Neal Cardwell
2025-05-16 20:10   ` Jeremy Harris

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