Skip to contentSkip to conversation

TCP_DEFER_ACCEPT documentation should be more precise about rounding to retransmits

PATCH In review Josh Triplett 2 participants 4 messages Apr 14 – Apr 19

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

tcp(7) says:

Quoted 1 line

Takes an integer value (seconds), this can bound the maximum number of attempts TCP will make to complete the connection.

However, it doesn't say *how* it bounds the attempts. From the kernel code, it appears to round up to the first retransmit time that's larger than the specified bound. Could the manpage please document this?

(Discovered when adding Rust bindings to this, and trying to figure out and document the rounding behavior.)

- Josh Triplett

#1 lore raw

Hi Josh,

Quoted 6 lines · Josh Triplett

tcp(7) says:

Quoted 1 line

Takes an integer value (seconds), this can bound the maximum number of attempts TCP will make to complete the connection.

However, it doesn't say *how* it bounds the attempts. From the kernel code, it appears to round up to the first retransmit time that's larger than the specified bound. Could the manpage please document this?

Would you mind sending a patch? (And if appropriate, CC someone.)

Have a lovely night!
Alex

Quoted 6 lines

(Discovered when adding Rust bindings to this, and trying to figure out and document the rounding behavior.)

- Josh Triplett

Signature · 1 line
<https://www.alejandro-colomar.es>
#2 lore raw

PATCH 1/1 Document TCP_DEFER_ACCEPT rounding

Patch attached.

From ad2b798376326d40944f6998270a755f61c57815 Mon Sep 17 00:00:00 2001
Message-ID: <ad2b798376326d40944f6998270a755f61c57815.1776374539.git.josh@joshtriplett.org>
From: Josh Triplett <[email protected]>
Date: Thu, 16 Apr 2026 14:21:34 -0700
Subject: [PATCH] Document TCP_DEFER_ACCEPT rounding

---
 man/man7/tcp.7 | 2 ++
 1 file changed, 2 insertions(+)
man/man7/tcp.7 +2 -0
index ff46ea7bc..26a99b879 100644
@@ -1091,6 +1091,8 @@ Allow a listener to be awakened only when data arrives on the socket.
 Takes an integer value (seconds), this can
 bound the maximum number of attempts TCP will make to
 complete the connection.
+The kernel will round this value up to the next larger TCP retransmit
+duration.
 .IP
 On a client socket,
 if nonzero,
Signature · 1 line
2.53.0
#3 lore raw

Re: [PATCH] Document TCP_DEFER_ACCEPT rounding

Hi Josh,

Quoted 1 line · Josh Triplett

Patch attached.

Thanks! I've applied the patch.

Have a lovely night!
Alex

Signature · 1 line
<https://www.alejandro-colomar.es>