public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/4] RFC: Reworks and improvements to TCP activity timers
@ 2026-02-04 11:41 David Gibson
  2026-02-04 11:41 ` [PATCH 1/4] tcp: Remove non-working activity timeout mechanism David Gibson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: David Gibson @ 2026-02-04 11:41 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

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


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

end of thread, other threads:[~2026-02-04 11:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-04 11:41 [PATCH 0/4] RFC: Reworks and improvements to TCP activity timers David Gibson
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

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