Article View: linux.kernel.netdev
Article #14052[PATCH net-next v4 4/4] selftests/net: packetdrill: add TCP MTU probing test
From: Yongjian Wang via B4 Relay
Date: Tue, 10 Nov 2026 16:45
Date: Tue, 10 Nov 2026 16:45
71 lines
13050 bytes
13050 bytes
From: Yongjian Wang <echoowall@gmail.com> Packetization layer path MTU discovery (net.ipv4.tcp_mtu_probing=2) has no selftest coverage. Add a test for an active connection. Check that it starts at tcp_base_mss, that it sends the first probe half way between tcp_base_mss and the peer's MSS once cwnd allows it, and that an acknowledged probe raises the MSS and leads to a larger probe. The SYN offers timestamps and the scripted SYN-ACK declines them. This also checks that MTU probing uses the negotiated header length for the initial send MSS. Signed-off-by: Yongjian Wang <echoowall@gmail.com> --- .../net/packetdrill/tcp_mtu_probing_search.pkt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_search.pkt b/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_search.pkt new file mode 100644 index 000000000000..a48acff8685e --- /dev/null +++ b/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_search.pkt @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0 +// Test packetization layer path MTU discovery with tcp_mtu_probing=2: an +// active connection starts at tcp_base_mss and raises its MSS by binary search +// as probes are acknowledged. + +`./defaults.sh +sysctl -q net.ipv4.tcp_mtu_probing=2 +sysctl -q net.ipv4.tcp_base_mss=1024` + + 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 + +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 + +0 connect(3, ..., ...) = -1 EINPROGRESS (Operation is now in progress) + +0 > S 0:0(0) <...> + +.1 < S. 0:0(0) ack 1 win 65535 <mss 1460,nop,nop,sackOK> + +0 > . 1:1(0) ack 1 + +0 fcntl(3, F_SETFL, O_RDWR) = 0 + +// The initial window is sent with tcp_base_mss. No probe yet, cwnd is below 11. + +0 write(3, ..., 40000) = 40000 + +0 > P. 1:2049(2048) ack 1 + +0 > P. 2049:4097(2048) ack 1 + +0 > P. 4097:6145(2048) ack 1 + +0 > P. 6145:8193(2048) ack 1 + +0 > P. 8193:10241(2048) ack 1 + +// The first probe is half way between tcp_base_mss and the peer's MSS. + +.1 < . 1:1(0) ack 10241 win 65535 + +0 > . 10241:11483(1242) ack 1 + +0 > P. 11483:13531(2048) ack 1 + +0 > P. 13531:15579(2048) ack 1 + +0 > P. 15579:17627(2048) ack 1 + +0 > P. 17627:19675(2048) ack 1 + +0 > P. 19675:21723(2048) ack 1 + +0 > P. 21723:23771(2048) ack 1 + +0 > P. 23771:25819(2048) ack 1 + +0 > P. 25819:27867(2048) ack 1 + +0 > P. 27867:29915(2048) ack 1 + +// Acknowledging the probe raises the MSS, and the next probe is larger. + +.1 < . 1:1(0) ack 29915 win 65535 + +0 > . 29915:31266(1351) ack 1 + +0 > P. 31266:33750(2484) ack 1 -- Git-157)
Technical Details
Message-ID:
<20261111-mtu-probing-series-v4-4-6f2e484ca8ea@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360438-linux-kernel-netdev=dewy.ruReferences:
<20261111-mtu-probing-series-v4-0-6f2e484ca8ea@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360438-linux-kernel-netdev=dewy.ru From: devnull+echoowall.gmail.com@kernel.org (Yongjian Wang via B4 Relay) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v4 4/4] selftests/net: packetdrill: add TCP MTU probing test Date: Wed, 11 Nov 2026 00:45:58 +0800 Organization: Usenet Network Message-ID: <20261111-mtu-probing-series-v4-4-6f2e484ca8ea@gmail.com> References: <20261111-mtu-probing-series-v4-0-6f2e484ca8ea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="656475"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:gtvGIPQyrMkyoDQXoY3yHVGz35I= sha256:Llj/UCZRo6hXWXFcCU1vhgWUKhlG4UA5GG3z750XoWo= sha1:yI/+fMEcQdHa/ZtiIwlaN2PInrs= sha256:0F8XkinsHHM+isKH3vVu6QGPNwolguh2CjLJCBjbUTc= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 60414113C6F; Tue, 10 Nov 2026 20:09:49 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rPEZtAW-TJHK; Tue, 10 Nov 2026 20:09:46 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-360438-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 1CEAE113C50; Tue, 10 Nov 2026 20:09:38 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 7C5EC1C1968; Tue, 10 Nov 2026 16:46:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794329170; b=f1Lf2NJuNYgqz8A1WBRlvhQQTnMrSQFxJLnskGqct81s3Gb0lL2kTfokKXwImXfyQbBh K2R20Ubgaj75pXLMnwS1Oet1LywPgqa8iboAWAz8ogaTemlfWJrwGFEYjXL3QyPp8lnob SPazfZPj+MrNjes3a2+JOPzviUVZL/DVKtBrgFsOTBVw2Gxag9Ti2c5jKg5x2wKe0JKtw tF89YYsIq5oP1yf0nHrlqSntOyjdL4nPYUSLOTl0YLrjE2dMqIgsM1tkj556b9R2u9qiF ijLZmWpkSB8qbKs7/bEvdI6ttGkZ5Hd0s8mg+xrxrU8XnTE7FC1uVkBg8QPzCBPiUIg== X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794329170; h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=8y9Jl+1LJ8OoB5nJzl2Bt+QCd/i+vREbZWGx+2qkt5U=; b=GTTFx6rloY0dMRhDsDqgIqgPg2S9f/NhvK+8X3/rRKtMX9mKUpeRD9CrcyY/F5pk506L CqTOXI10cH4FjLIkobZNIsPEUKJExUnLi/nj+Qj+dM58WTOD0l5pjaCwvQoALrz/nQMMj 6sjxB6PTNqySZHblInTJRfCpj8TPNYc1Tr1NpTZuRc+nwmOS8rjxbc6OJDSB3cbjpbb/Q 40FzyRWy8+kQYk27ldf1PdiiojoJAxm3IMETVbToDSAxLOA+bhD7Vi/trslfb0uMRDpSZ MD1txVg4qynUpeG8NPGPgwVQORr4udhPc7EdFb/JCwlOHIRcdBvPMuqZ5L1BuELW0Ig== X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TbvaiESJ; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9B3360A2609; Tue, 10 Nov 2026 16:46:10 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TbvaiESJ X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794329160; b=vxB5B8OIXfC+b04s9GdtN/+ktVfdzlZhlRNsIIOSUVfFeitH41UUYHcWfaFVCPqLeiPx Vh+/Cg+5KD1K0WyJnXMuYEzcUvWtyvCblre3006uXl/kQxG3Ni3HeIyPyS4InBMs5iJk9 Ri50cbRp00nQXzC5HLhtXDnAwQeTb9bSxIcSyBq1Xh4ihFd51I+NHwoxr9n9LhDL8NSEa wgQTAbSDjuZd0B2XAb6VoIX79vFnvoedaTi5UpXXruhZm59kTq0AoDO7AwH/sMJQBkK+P cbYLTGHxtPGZQ2Udmo3JeFRu22IYgCgeb4KufR6U0FHnNt8kr3ruamlfiRrhztwOLoQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794329160; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=8y9Jl+1LJ8OoB5nJzl2Bt+QCd/i+vREbZWGx+2qkt5U=; b=iXP6EOofHlt2Ho13xit9HTe5sHb82GtjmSvK0P0J3NK5ZpMnlHKaoKYuuhaCCAhwpHTs XhsTpLaTexw6BZ2kjYOsNOcwlBQt6CGm01Gqm/ufqjJUIn9DEBDdR5sgxf4YQs/PYQhO2 dNrMHzYzO8A0O1H5dJCZAvpTZ7fGzCxiaa6chGS1x2hMOr6uBNwO39UeG0iFqWWwxb/LB PID7h6vFvwR58KX/5sEscbUGfFdTLJQSVssyPHFV2XOlTLv49IqTu2oLIKa5tvwaY9tty xM3/pNliPpW3YiLNCVZ3ZMw0/0OYd36+iP7Izu3lc6yVFVnjzDQi4l5aWsOPj9m2KuA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TbvaiESJ; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B345A606A326; Tue, 10 Nov 2026 16:45:59 +0000 (UTC) X-Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 X-ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1794329159; b=OW2cT8y4rHbKXKYFoaw1WuABUpMP6xpZkvJyL4jg6J3OhyNyzkBJjgKVmxNSGDtr1XYu FDad64x1X5aBvjlPYO9jKPk0tR+Vs8bM449pi2aAam4vmVZkhsIRzquuBU0zZgfO/vKQi 7ZB7jr79DDBkKya7i5J1Ere0IVKrEmfH/WrSsrxlyTQpkQ0LXD6gRE+iP9+u0cDmRSYtY 67Tmp/O7aBP0xFvGiXs2k2+tasK1Ynv01L8VhIxb4fUXCzfNc/SVI8UxB+RS14fUqRBa5 Zk92+eD0DJcvAAB9PtTj67EpqL/ICwmJlAmDnmxGHqb+OENt30DuALVvtpuphmSuafQ== X-ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1794329159; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=8y9Jl+1LJ8OoB5nJzl2Bt+QCd/i+vREbZWGx+2qkt5U=; b=uEXa50z/O9yHAr7UHpy5zTccjfiZj/fVAxNWKRPqcRas3Xg4vdOetG3VByjyDN1CbfBQ GMFNL5C5R3u6Foc6skEL2wh2pulJpNa+8wXst3ocbUqLVXgnuzwfWEfwr/ppyk2vgoSB7 IIurG95BOuAvoBFtwj3aNVGwtYCqcK3GGaxNYYjlf2hXHZBkAxwMlWtwMy+vaxOyrTcyd xEgX4S03AiX/x4sNpj/WGnD9CH7TKktz80IOF52I1XajEV5Auxc/Bn/JmiSZ5XE8XAnBo /zEwkKermUEr+BnYuvxvyPviyT85KPPIzIOrzeVDmQG81vKDlRgMfuj5g+NPNhNMpyw== X-ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 X-Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 8D3E81F008A4; Tue, 10 Nov 2026 16:45:58 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794329159; bh=8y9Jl+1LJ8OoB5nJzl2Bt+QCd/i+vREbZWGx+2qkt5U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=TbvaiESJodq/aM66lzkT0iKL49Jnd6+dKpI4B2kOUhV8PgokGrR0sXCWtEnxDU5dF Oz2TR2V2mLE7Z/ryEMIWU5YhewBTfzVHFsR0x4KRMG9WGRWpKbIMR39j6oZpgvgd/r +HACooefLp8SEEcgyEzjtPFlOs0v7wzFPGFrdj0sz72Ncyl00is2J5MiYadIc/HgrP KJldOuThvIIwef9AxEWlgeUvt8tgRIgceCMkIZ3i8zu4HaBqDk84/3jhA++YYr/6Av jjo2TjzO4jj2aWYP1TsuLubxwdktVObDMQmVIJ9ctMYrpRv0vXlg0QRbJwYipkFCN9 xYIF0QStOLk1w== X-Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 19A0C48C04; Tue, 10 Nov 2026 16:45:58 +0000 (UTC) X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261111-mtu-probing-series-v4-0-6f2e484ca8ea@gmail.com> X-Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, panweiping3@gmail.com, Yongjian Wang <echoowall@gmail.com> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1794329156; l=2652; i=echoowall@gmail.com; s=20261026; h=from:subject:message-id; bh=Mz0+KsqQBxhWJlyZhAiEUnDL/oZgfrLTgEwG3eDqtks=; b=lOpdu2t1/HknQKiDM/kdhS7CxpI1N/KpY8LGOPTA4RpuY8k9oW0b5KlqX4DjyPun0QyF1jm0b jbQmw4a57rlDT03JuPtCt9xKnT40UwcTC3Kf5/gdWkkx7L9O/JPHXKk X-Developer-Key: i=echoowall@gmail.com; a=ed25519; pk=9XP6JhqjjPsHCF6UZZZTeqTRnXIa4+ufggnxXtTJ+no= X-Endpoint-Received: by B4 Relay for echoowall@gmail.com/20261026 with auth_id=1323 X-Original-From: Yongjian Wang <echoowall@gmail.com> X-Reply-To: echoowall@gmail.com