public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/4] Reworks and improvements to TCP activity timers
@ 2026-02-06  6:17 David Gibson
  2026-02-06  6:17 ` [PATCH v2 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-06  6:17 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 existing non-working activity timeout.
   Arguably it should be much longer (several days), like the kernel
   NAT timeout for idle connection tracking.

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

Changes in v2:
 * Set keepalive interval to 300s
 * Fix an inordinate number of typos and other cosmetic errors

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          | 118 ++++++++++++++++++++++++++++++++++++++-----------
 tcp.h          |   6 ++-
 tcp_buf.c      |   4 ++
 tcp_conn.h     |   5 +++
 tcp_internal.h |   2 +
 tcp_vu.c       |   3 ++
 6 files changed, 112 insertions(+), 26 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-02-06  6:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-06  6:17 [PATCH v2 0/4] Reworks and improvements to TCP activity timers David Gibson
2026-02-06  6:17 ` [PATCH v2 1/4] tcp: Remove non-working activity timeout mechanism David Gibson
2026-02-06  6:17 ` [PATCH v2 2/4] tcp: Re-introduce inactivity timeouts based on a clock algorithm David Gibson
2026-02-06  6:17 ` [PATCH v2 3/4] tcp: Extend tcp_send_flag() to send TCP keepalive segments David Gibson
2026-02-06  6:17 ` [PATCH v2 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).