netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] Make TIME-WAIT reuse delay deterministic and configurable
@ 2024-12-09 19:38 Jakub Sitnicki
  2024-12-09 19:38 ` [PATCH net-next v2 1/2] tcp: Measure TIME-WAIT reuse delay with millisecond precision Jakub Sitnicki
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Jakub Sitnicki @ 2024-12-09 19:38 UTC (permalink / raw)
  To: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Jason Xing, Adrien Vasseur, Lee Valentine, kernel-team

This patch set is an effort to enable faster reuse of TIME-WAIT sockets.
We have recently talked about the motivation and the idea at Plumbers [1].

Experiment in production
------------------------

We are restarting our experiment on a small set of production nodes as the
code has slightly changed since v1 [2], and there are still a few weeks of
development window to soak the changes. We will report back if we observe
any regressions.

Packetdrill tests
-----------------

The packetdrill tests for TIME-WAIT reuse [3] did not change since v1.
Although we are not touching PAWS code any more, I would still like to add
tests to cover PAWS reject after TW reuse. This, however, requires patching
packetdrill as I mentioned in the last cover letter [2].

Thanks,
-jkbs

[1] https://lpc.events/event/18/contributions/1962/
[2] https://lore.kernel.org/r/20241113-jakub-krn-909-poc-msec-tw-tstamp-v2-0-b0a335247304@cloudflare.com
[3] https://github.com/google/packetdrill/pull/90

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
---
Changes in v2:
- Pivot to a dedicated msec timestamp for entering TIME-WAIT state (Eric)
- Link to v1: https://lore.kernel.org/r/20241204-jakub-krn-909-poc-msec-tw-tstamp-v1-0-8b54467a0f34@cloudflare.com

Changes in v1:
- packetdrill: Adjust TS val for reused connection so value keep increasing
- Link to RFCv2: https://lore.kernel.org/r/20241113-jakub-krn-909-poc-msec-tw-tstamp-v2-0-b0a335247304@cloudflare.com

Changes in RFCv2:
- Make TIME-WAIT reuse configurable through a per-netns sysctl.
- Account for timestamp rounding so delay is not shorter than set value.
- Use tcp_mstamp when we know it is fresh due to receiving a segment.
- Link to RFCv1: https://lore.kernel.org/r/20240819-jakub-krn-909-poc-msec-tw-tstamp-v1-1-6567b5006fbe@cloudflare.com

---
Jakub Sitnicki (2):
      tcp: Measure TIME-WAIT reuse delay with millisecond precision
      tcp: Add sysctl to configure TIME-WAIT reuse delay

 Documentation/networking/ip-sysctl.rst                     | 14 ++++++++++++++
 .../networking/net_cachelines/netns_ipv4_sysctl.rst        |  1 +
 include/net/inet_timewait_sock.h                           |  4 ++++
 include/net/netns/ipv4.h                                   |  1 +
 net/ipv4/sysctl_net_ipv4.c                                 | 10 ++++++++++
 net/ipv4/tcp_ipv4.c                                        |  7 +++++--
 net/ipv4/tcp_minisocks.c                                   |  7 ++++++-
 7 files changed, 41 insertions(+), 3 deletions(-)


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

end of thread, other threads:[~2024-12-13 13:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 19:38 [PATCH net-next v2 0/2] Make TIME-WAIT reuse delay deterministic and configurable Jakub Sitnicki
2024-12-09 19:38 ` [PATCH net-next v2 1/2] tcp: Measure TIME-WAIT reuse delay with millisecond precision Jakub Sitnicki
2024-12-10  8:11   ` Eric Dumazet
2024-12-12  1:00   ` Jason Xing
2024-12-09 19:38 ` [PATCH net-next v2 2/2] tcp: Add sysctl to configure TIME-WAIT reuse delay Jakub Sitnicki
2024-12-10  8:21   ` Eric Dumazet
2024-12-12  1:08   ` Jason Xing
2024-12-12  4:30 ` [PATCH net-next v2 0/2] Make TIME-WAIT reuse delay deterministic and configurable patchwork-bot+netdevbpf
2024-12-13 13:06 ` Jakub Sitnicki

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