From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 0/4] RFC: Reworks and improvements to TCP activity timers
Date: Wed, 4 Feb 2026 21:41:33 +1000 [thread overview]
Message-ID: <20260204114137.2784090-1-david@gibson.dropbear.id.au> (raw)
Here's a bunch of patches aimed at fixing bug 179, and reworking the
currently broken inactivity timer along the way.
I believe patches 1..2/4 are ready to go - I've tested them, and I'm
happy with how they're behaving. Patches 3..4/4 I think are correct,
but I've been getting bogged down in details trying to test them in
the specific FIN_WAIT_2 situation that occurs in bug 179.
I'm sending this out for comment, while I look at some other things to
clear my head.
Caveats:
* Currently the inactivity timer uses an interval of 2h to match the
intended behaviour of the existig non-working activity timeout.
Arguably it should be much longer (several days), like the kernel
NAT timeout for idle connection tracking.
* The keepalive interval is currently 30s. That's too short - I have
it there just for testing. I was intending to change it to 300s
(5m) for "real", but that's certainly open to discussion.
* This introduces two new fields in the connection structure, as the
clock values for the two new timers. These are new 1-bit bool
fields slotted into a 3-bit gap. Arguably these would be cleaner
as new bits in the 'flags' field. However, since we only have one
spare bit there at the moment, that would require some more complex
reorganization which I didn't want to tackle right now.
David Gibson (4):
tcp: Remove non-working activity timeout mechanism
tcp: Re-introduce inactivity timeouts based on a clock algorithm
tcp: Extend tcp_send_flag() to send TCP keepalive segments
tcp: Send TCP keepalive segments after a period of tap-side inactivity
tcp.c | 115 ++++++++++++++++++++++++++++++++++++++-----------
tcp.h | 6 ++-
tcp_buf.c | 4 ++
tcp_conn.h | 5 +++
tcp_internal.h | 2 +
tcp_vu.c | 3 ++
6 files changed, 109 insertions(+), 26 deletions(-)
--
2.52.0
next reply other threads:[~2026-02-04 11:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 11:41 David Gibson [this message]
2026-02-04 11:41 ` [PATCH 1/4] tcp: Remove non-working activity timeout mechanism David Gibson
2026-02-04 11:41 ` [PATCH 2/4] tcp: Re-introduce inactivity timeouts based on a clock algorithm David Gibson
2026-02-04 11:41 ` [PATCH 3/4] tcp: Extend tcp_send_flag() to send TCP keepalive segments David Gibson
2026-02-04 11:41 ` [PATCH 4/4] tcp: Send TCP keepalive segments after a period of tap-side inactivity David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260204114137.2784090-1-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
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 IMAP folder(s).