Re: [PATCH net-next v4 1/4] tcp: initialize MTU probing before syncing MSS at connection setup
From: Neal Cardwell
Date: Sat Nov 14 2026 - 11:12:16 EST
On Tue, Nov 10, 2026 at 11:46 AM Yongjian Wang via B4 Relay
<devnull+echoowall.gmail.com@xxxxxxxxxx> wrote:
>
> From: Yongjian Wang <echoowall@xxxxxxxxx>
>
> With tcp_mtu_probing=2, a passive connection starts at the full MSS
> rather than tcp_base_mss. The IPv4 and IPv6 syn_recv_sock() paths
> call tcp_sync_mss() before tcp_init_transfer() enables MTU probing.
> With tcp_base_mss=1024, the first successful probe can therefore lower
> the MSS from 1460 to 1242. On a black hole path, the first reduction
> skips 1024 and goes straight to 512.
>
> The issue surfaced while developing packetdrill coverage for MTU
> probing and comparing the initial send MSS on active and passive
> IPv4 connections.
>
> Commit 4d83e1773031 ("tcp: delete redundant calls of tcp_mtup_init()")
> removed tcp_mtup_init() from the passive setup paths.
> Commit 27204aaa9dc6
> ("tcp: uniform the set up of sockets after successful connection")
> later moved MTU probing initialization into tcp_init_transfer(),
> away from tcp_sync_mss().
>
> Initialize MTU probing immediately before the existing tcp_sync_mss()
> calls in the IPv4 and IPv6 passive setup paths and when processing
> a SYN-ACK for an active connection. Remove the late initialization
> from tcp_init_transfer(). This lets tcp_sync_mss() apply tcp_base_mss
> without adding another MSS calculation to connection setup. The
> crossed-SYN path already uses this order.
>
> Fixes: 4d83e1773031 ("tcp: delete redundant calls of tcp_mtup_init()")
> Suggested-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
> Suggested-by: Neal Cardwell <ncardwell@xxxxxxxxxx>
> Signed-off-by: Yongjian Wang <echoowall@xxxxxxxxx>
> Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
> ---
Reviewed-by: Neal Cardwell <ncardwell@xxxxxxxxxx>
Thanks!
neal