Skip to content

Conversation

@jsitnicki
Copy link

@jsitnicki jsitnicki commented Dec 4, 2024

This set of tests accompanies the kernel patch set which adds a knob for
setting the TIME-WAIT reuse delay [1], which has been merged in [2].

Tests cover connection reincarnation through TIME-WAIT reuse with the
default reuse delay (1 second) as well as with a reuse delay radically
shortened down to 1 millisecond.

We exercise both the happy and failure scenarios, where TW reuse is not
possible because the required delay period has not elapsed yet.

[1] https://lore.kernel.org/all/20241204-jakub-krn-909-poc-msec-tw-tstamp-v1-0-8b54467a0f34@cloudflare.com/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=154dee7c3265bb8c1e9e87ee63dd195497155854

@google-cla
Copy link

google-cla bot commented Dec 4, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

matttbe pushed a commit to multipath-tcp/mptcp_net-next that referenced this pull request Dec 12, 2024
Jakub Sitnicki says:

====================
Make TIME-WAIT reuse delay deterministic and configurable

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

[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] google/packetdrill#90

v1: https://lore.kernel.org/20241204-jakub-krn-909-poc-msec-tw-tstamp-v1-0-8b54467a0f34@cloudflare.com
RFCv2: https://lore.kernel.org/20241113-jakub-krn-909-poc-msec-tw-tstamp-v2-0-b0a335247304@cloudflare.com
RFCv1: https://lore.kernel.org/20240819-jakub-krn-909-poc-msec-tw-tstamp-v1-1-6567b5006fbe@cloudflare.com
====================

Link: https://patch.msgid.link/20241209-jakub-krn-909-poc-msec-tw-tstamp-v2-0-66aca0eed03e@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This set of tests accompanies the kernel patch set which adds a knob for
setting the TIME-WAIT reuse delay [1], which has been merged in [2].

Tests cover connection reincarnation through TIME-WAIT reuse with the
default reuse delay (1 second) as well as with a reuse delay radically
shortened down to 1 millisecond.

We exercise both the happy and failure scenarios, where TW reuse is not
possible because the required delay period has not elapsed yet.

[1] https://lore.kernel.org/all/20241204-jakub-krn-909-poc-msec-tw-tstamp-v1-0-8b54467a0f34@cloudflare.com/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=154dee7c3265bb8c1e9e87ee63dd195497155854
@jsitnicki
Copy link
Author

Test run against net-next @ 154dee7c3265 ("Merge branch 'make-time-wait-reuse-delay-deterministic-and-configurable'"):

root@virtme-ng:/home/jakub/src/packetdrill/gtests/net# ./packetdrill/run_all.py -v -S -L -l tcp/ts_recent/tw_reuse/
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/fast_tw_reuse_fail_after_500usec.pkt (ipv4)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/fast_tw_reuse_fail_after_500usec.pkt (ipv4-mapped-v6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/fast_tw_reuse_fail_after_500usec.pkt (ipv6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/fast_tw_reuse_ok_after_1msec.pkt (ipv4)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/fast_tw_reuse_ok_after_1msec.pkt (ipv4-mapped-v6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/fast_tw_reuse_ok_after_1msec.pkt (ipv6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_0sec.pkt (ipv4)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_0sec.pkt (ipv4-mapped-v6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_0sec.pkt (ipv6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_1sec_without_tsopt.pkt (ipv4)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_1sec_without_tsopt.pkt (ipv4-mapped-v6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_1sec_without_tsopt.pkt (ipv6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_990msec.pkt (ipv4)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_990msec.pkt (ipv4-mapped-v6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_fail_after_990msec.pkt (ipv6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_ok_after_0sec_with_portlock.pkt (ipv4)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_ok_after_0sec_with_portlock.pkt (ipv4-mapped-v6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_ok_after_0sec_with_portlock.pkt (ipv6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_ok_after_1sec.pkt (ipv4)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_ok_after_1sec.pkt (ipv4-mapped-v6)]
stdout:
stderr:
OK   [/home/jakub/src/packetdrill/gtests/net/tcp/ts_recent/tw_reuse/tw_reuse_ok_after_1sec.pkt (ipv6)]
stdout:
stderr:
Ran   21 tests:   21 passing,    0 failing,    0 timed out (24.01 sec): tcp/ts_recent/tw_reuse/
root@virtme-ng:/home/jakub/src/packetdrill/gtests/net#

@jsitnicki jsitnicki marked this pull request as ready for review December 13, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant