Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Yongjian Wang via B4 Relay
Tue, 17 Nov 2026 08:09
[PATCH net-next] tcp: document black hole detection for tcp_mtu_probing
Author: Yongjian Wang via B4 Relay
Date: Tue, 17 Nov 2026 08:09
Date: Tue, 17 Nov 2026 08:09
62 lines
12953 bytes
12953 bytes
From: Yongjian Wang <echoowall@gmail.com>
ip-sysctl.rst says that tcp_mtu_probing=1 enables MTU probing once an
ICMP black hole is detected, but not when that happens or what TCP
does then.
Describe both, as implemented in tcp_write_timeout() and
tcp_mtu_probing(). Also add the missing defaults of tcp_mtu_probing
and tcp_base_mss.
Signed-off-by: Yongjian Wang <echoowall@gmail.com>
---
This describes the behavior checked by the black hole detection tests
added in commit 8a83f21ad75d ("selftests/net: packetdrill: add TCP black
hole detection tests").
---
Documentation/networking/ip-sysctl.rst | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst
index 0b7bfbd98a92..a11baf04758c 100644
--- a/Documentation/networking/ip-sysctl.rst
+++ b/Documentation/networking/ip-sysctl.rst
@@ -412,6 +412,8 @@ tcp_base_mss - INTEGER
Path MTU discovery (MTU probing). If MTU probing is enabled,
this is the initial MSS used by the connection.
+ Default: 1024
+
tcp_mtu_probe_floor - INTEGER
If MTU probing is enabled this caps the minimum MSS used for search_low
for the connection.
@@ -711,6 +713,20 @@ tcp_mtu_probing - INTEGER
- 1 - Disabled by default, enabled when an ICMP black hole detected
- 2 - Always enabled, use initial MSS of tcp_base_mss.
+ A black hole is detected when the retransmission timer fires after
+ the handshake and retransmissions have stayed unacknowledged for as
+ long as tcp_retries1 retransmissions would take with the minimum
+ RTO, which is 3 seconds with the default tcp_retries1.
+
+ With value 1, the first detection enables MTU probing and the MSS
+ falls back to tcp_base_mss. Each later detection, or any detection
+ with value 2, lowers search_low to half its MSS, keeping it at most
+ tcp_base_mss and at least tcp_mtu_probe_floor and tcp_min_snd_mss.
+ Once MTU probing is enabled, the connection also probes for a larger
+ MSS, as with value 2.
+
+ Default: 0
+
tcp_probe_interval - UNSIGNED INTEGER
Controls how often to start TCP Packetization-Layer Path MTU
Discovery reprobe. The default is reprobing every 10 minutes as
---
base-commit: 6ff4c5942a301675eb12e5b49d53a81e604624a1
change-id: 20261117-tcp-mtu-probing-doc-v1-351cb754fa7b
Best regards,
--
Yongjian Wang <echoowall@gmail.com>
Re: [PATCH net-next] tcp: document black hole detection for tcp_mtu_probing
Author: Eric Dumazet
Date: Tue, 17 Nov 2026 08:17
Date: Tue, 17 Nov 2026 08:17
99 lines
12573 bytes
12573 bytes
Le mar. 17 nov. 2026 ร 09:09, Yongjian Wang via B4 Relay
<devnull+echoowall.gmail.com@kernel.org> a รฉcrit :
>
> From: Yongjian Wang <echoowall@gmail.com>
>
> ip-sysctl.rst says that tcp_mtu_probing=1 enables MTU probing once an
> ICMP black hole is detected, but not when that happens or what TCP
> does then.
>
> Describe both, as implemented in tcp_write_timeout() and
> tcp_mtu_probing(). Also add the missing defaults of tcp_mtu_probing
> and tcp_base_mss.
>
> Signed-off-by: Yongjian Wang <echoowall@gmail.com>
> ---
> This describes the behavior checked by the black hole detection tests
> added in commit 8a83f21ad75d ("selftests/net: packetdrill: add TCP black
> hole detection tests").
> ---
> Documentation/networking/ip-sysctl.rst | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst
> index 0b7bfbd98a92..a11baf04758c 100644
> --- a/Documentation/networking/ip-sysctl.rst
> +++ b/Documentation/networking/ip-sysctl.rst
> @@ -412,6 +412,8 @@ tcp_base_mss - INTEGER
> Path MTU discovery (MTU probing). If MTU probing is enabled,
> this is the initial MSS used by the connection.
>
> + Default: 1024
> +
> tcp_mtu_probe_floor - INTEGER
> If MTU probing is enabled this caps the minimum MSS used for search_low
> for the connection.
> @@ -711,6 +713,20 @@ tcp_mtu_probing - INTEGER
> - 1 - Disabled by default, enabled when an ICMP black hole detected
> - 2 - Always enabled, use initial MSS of tcp_base_mss.
>
> + A black hole is detected when the retransmission timer fires after
> + the handshake and retransmissions have stayed unacknowledged for as
> + long as tcp_retries1 retransmissions would take with the minimum
> + RTO, which is 3 seconds with the default tcp_retries1.
"minimum RTO" is ambiguous in this file: readers will think of
tcp_rto_min_us or the per-route rto_min. retransmits_timed_out() uses
the TCP_RTO_MIN constant here, so I would spell out 200 ms.
It might also be worth saying that this time is counted from the first
retransmission, and only checked when the timer fires. For a flow with
a 200 ms RTO, the detection happens at the fifth timeout, about
6 seconds after the original transmission.
(The 3 seconds also assume the default tcp_rto_max_ms, but I do not
think this needs to be documented.)
> +
> + With value 1, the first detection enables MTU probing and the MSS
> + falls back to tcp_base_mss. Each later detection, or any detection
The MSS is only lowered: tcp_sync_mss() uses
min(mss, search_low mss), so a connection already below tcp_base_mss
keeps its MSS.
"Each later detection" could be "Each further retransmission timeout",
since tcp_mtu_probing() is called on every RTO once the threshold has
been reached.
> + with value 2, lowers search_low to half its MSS, keeping it at most
> + tcp_base_mss and at least tcp_mtu_probe_floor and tcp_min_snd_mss.
> + Once MTU probing is enabled, the connection also probes for a larger
> + MSS, as with value 2.
> +
> + Default: 0
> +
> tcp_probe_interval - UNSIGNED INTEGER
> Controls how often to start TCP Packetization-Layer Path MTU
> Discovery reprobe. The default is reprobing every 10 minutes as
>
> ---
> base-commit: 6ff4c5942a301675eb12e5b49d53a81e604624a1
> change-id: 20261117-tcp-mtu-probing-doc-v1-351cb754fa7b
>
> Best regards,
> --
> Yongjian Wang <echoowall@gmail.com>
>
Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads