🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Yongjian Wang via B4 Relay Mon, 23 Nov 2026 11:04
[PATCH net-next v3 0/2] tcp: document and test MTU probing black hole fallback
#20918
Author: Yongjian Wang via B4 Relay
Date: Mon, 23 Nov 2026 11:04
41 lines
12443 bytes
ip-sysctl.rst does not say when TCP detects a black hole with
tcp_mtu_probing=1 or how the MSS drops afterwards. Patch 1 documents
both. Patch 2 adds a packetdrill test for the part that had no
coverage: each further retransmission timeout halves the MSS, down to
tcp_mtu_probe_floor.

On x86_64 KVM, the new test passed in IPv4, IPv6 and IPv4-mapped IPv6.
Variants expecting no floor or no halving failed in all three modes.

Changes in v3:
- Say that only timeouts at which a black hole is still detected lower
  search_low again, and that the floors take precedence over the
  tcp_base_mss cap (patch 1). Kept Eric's and Kuniyuki's tags since
  the change is limited to this sentence.
- Link to v2: https://lore.kernel.org/r/20261118-tcp-mtu-probing-doc-v1-v2-0-e795f20b8cfe@gmail.com

Changes in v2:
- Spell out the 200 ms RTO, say when the time starts and when it is
  checked, and give the resulting detection time (Eric, patch 1).
- Say that the MSS is only lowered, and that each further
  retransmission timeout lowers it again (Eric, patch 1).
- Add a test for tcp_mtu_probe_floor (patch 2).
- Link to v1: https://lore.kernel.org/r/20261117-tcp-mtu-probing-doc-v1-v1-1-552ae04de4ef@gmail.com

Signed-off-by: Yongjian Wang <echoowall@gmail.com>
---
Yongjian Wang (2):
      tcp: document black hole detection for tcp_mtu_probing
      selftests/net: packetdrill: test tcp_mtu_probe_floor

 Documentation/networking/ip-sysctl.rst             | 22 +++++++++++++
 .../tcp_mtu_probing_blackhole_floor.pkt            | 37 ++++++++++++++++++++++
 2 files changed, 59 insertions(+)
---
base-commit: 6ff4c5942a301675eb12e5b49d53a81e604624a1
change-id: 20261117-tcp-mtu-probing-doc-v1-351cb754fa7b

Best regards,
--  
Yongjian Wang <echoowall@gmail.com>
[PATCH net-next v3 2/2] selftests/net: packetdrill: test tcp_mtu_probe_floor
#20919
Author: Yongjian Wang via B4 Relay
Date: Mon, 23 Nov 2026 11:04
66 lines
12761 bytes
From: Yongjian Wang <echoowall@gmail.com>

tcp_mtu_probe_floor has no selftest coverage.

Add a test where a full-sized segment keeps timing out without any ICMP
feedback. After the first detection falls back to tcp_base_mss, check
that each further retransmission timeout halves the MSS, and that the
MSS stops at tcp_mtu_probe_floor.

Use tcp_retries1=1 and disable TLP, as in
tcp_mtu_probing_blackhole_no_tlp_retries1_is_1.pkt, so that every
retransmission comes from the RTO timer.

Signed-off-by: Yongjian Wang <echoowall@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
---
 .../tcp_mtu_probing_blackhole_floor.pkt            | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_blackhole_floor.pkt b/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_blackhole_floor.pkt
new file mode 100644
index 000000000000..dd040d9beca0
--- /dev/null
+++ b/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_blackhole_floor.pkt
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0
+// Test that after black hole detection, each further retransmission timeout
+// halves the MSS, but not below tcp_mtu_probe_floor.
+
+`./defaults.sh
+sysctl -q net.ipv4.tcp_mtu_probing=1
+sysctl -q net.ipv4.tcp_base_mss=1024
+sysctl -q net.ipv4.tcp_mtu_probe_floor=300
+sysctl -q net.ipv4.tcp_retries1=1
+sysctl -q net.ipv4.tcp_early_retrans=0`
+
+    0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+   +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+   +0 bind(3, ..., ...) = 0
+   +0 listen(3, 1) = 0
+
+   +0 < S 0:0(0) win 65535 <mss 1460,nop,nop,sackOK>
+   +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK>
+  +.1 < . 1:1(0) ack 1 win 65535
+   +0 accept(3, ..., ...) = 4
+
+   +0 write(4, ..., 1460) = 1460
+   +0 > P. 1:1461(1460) ack 1
+  +.3 > P. 1:1461(1460) ack 1
+
+// The first detection falls back to tcp_base_mss.
+  +.6 > . 1:1025(1024) ack 1
+
+// Each further timeout halves the MSS.
+ +1.2 > . 1:513(512) ack 1
+
+// Half of 512 is below tcp_mtu_probe_floor, so the floor is used.
+ +2.4 > . 1:301(300) ack 1
+
+// The MSS does not go below the floor.
+ +4.8 > . 1:301(300) ack 1
+  +.1 < . 1:1(0) ack 1461 win 65535

-- 
Git-157)
Re: [PATCH net-next v3 0/2] tcp: document and test MTU probing black hole fallback
#24214
Author: patchwork-bot+netdevbpf
Date: Sun, 29 Nov 2026 17:40
28 lines
9058 bytes
Hello:

This series was applied to netdev/net-next.git (main)
by Willem de Bruijn <willemb@google.com>:

On Mon, 23 Nov 2026 19:04:08 +0800 you wrote:
> ip-sysctl.rst does not say when TCP detects a black hole with
> tcp_mtu_probing=1 or how the MSS drops afterwards. Patch 1 documents
> both. Patch 2 adds a packetdrill test for the part that had no
> coverage: each further retransmission timeout halves the MSS, down to
> tcp_mtu_probe_floor.
> 
> On x86_64 KVM, the new test passed in IPv4, IPv6 and IPv4-mapped IPv6.
> Variants expecting no floor or no halving failed in all three modes.
> 
> [...]

Here is the summary with links:
  - [net-next,v3,1/2] tcp: document black hole detection for tcp_mtu_probing
    https://git.kernel.org/netdev/net-next/c/5b3285a6df3d
  - [net-next,v3,2/2] selftests/net: packetdrill: test tcp_mtu_probe_floor
    https://git.kernel.org/netdev/net-next/c/6abfb1071714

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
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