Article View: linux.kernel.netdev
Article #10096[PATCH net-next 3/4] selftests/net: packetdrill: add TCP black hole detection test
From: Yongjian Wang via B4 Relay
Date: Tue, 03 Nov 2026 07:09
Date: Tue, 03 Nov 2026 07:09
66 lines
12661 bytes
12661 bytes
From: Yongjian Wang <echoowall@gmail.com> Black hole detection (net.ipv4.tcp_mtu_probing=1) has no selftest coverage. Add a test where a full-sized segment keeps timing out without any ICMP feedback. Check that the MSS drops to tcp_base_mss once tcp_retries1 is exceeded, and that the smaller MSS is also used for new data after the retransmission is acknowledged. Set tcp_retries1 to 1 to keep the test short, and disable TLP so that every retransmission comes from the RTO timer, which is what tcp_write_timeout() counts. Signed-off-by: Yongjian Wang <echoowall@gmail.com> --- .../net/packetdrill/tcp_mtu_probing_blackhole.pkt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_blackhole.pkt b/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_blackhole.pkt new file mode 100644 index 000000000..f10dbb36d --- /dev/null +++ b/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_blackhole.pkt @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0 +// Test black hole detection with tcp_mtu_probing=1: when full-sized segments +// keep timing out and no ICMP arrives, TCP falls back to tcp_base_mss. + +`./defaults.sh +sysctl -q net.ipv4.tcp_mtu_probing=1 +sysctl -q net.ipv4.tcp_base_mss=1024 +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 + +// The first retransmission keeps the full size. + +.3 > P. 1:1461(1460) ack 1 + +// Once tcp_retries1 is exceeded the MSS drops to tcp_base_mss. + +.6 > . 1:1025(1024) ack 1 + +.1 < . 1:1(0) ack 1025 win 65535 + +0 > P. 1025:1461(436) ack 1 + +.1 < . 1:1(0) ack 1461 win 65535 + +// New data keeps using the smaller MSS. + +0 write(4, ..., 1460) = 1460 + +0 > . 1461:2485(1024) ack 1 + +0 > P. 2485:2921(436) ack 1 + +.1 < . 1:1(0) ack 2921 win 65535 -- Git-157)
Technical Details
Message-ID:
<20261103-mtu-probing-series-v1-3-a2809e725aaa@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355255-linux-kernel-netdev=dewy.ruReferences:
<20261103-mtu-probing-series-v1-0-a2809e725aaa@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355255-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 3/4] selftests/net: packetdrill: add TCP black hole detection test Date: Tue, 03 Nov 2026 15:09:43 +0800 Organization: Usenet Network Message-ID: <20261103-mtu-probing-series-v1-3-a2809e725aaa@gmail.com> References: <20261103-mtu-probing-series-v1-0-a2809e725aaa@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="3112634"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:PGShsiQ/TxWUQU79pQ/ilX9xujE= sha256:AFPb8shHafLXRq3m3VTqOoMrUVImwm5FWz6dMLpc/xU= sha1:Jb1aEtxX+75ndTbXMDu8mQ2ECkA= sha256:yHbAxXtePcs9pldOZa2+xnGx8n58nNI232b80+tRFfg= 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 16C07112759; Tue, 3 Nov 2026 10:13:05 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 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] 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 vSH-gnG0Ptli; Tue, 3 Nov 2026 10:13:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-355255-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 78B6B1126F3; Tue, 3 Nov 2026 10:12:54 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id BA9842BFCD; Tue, 3 Nov 2026 07:09: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=1793689792; b=JgVrapiqXcFnuKG49H8oe+xO+s2h7eLYEBBnXbT3gQkXWvae/JQpTR48xnbR398zOF8P Cwj9avL4ucIEb0aLZhFwHEr/w8of7JIIQX4kALZqZSkwRfs039sirXef0rp/LdUSkWZz6 B9/nJq7v91HJI14sNBQyMV78tZ1JJ5hjCyANKDqXhpZXNuN3I6Hazv5eb8CETq5yfKM6T MLg3hVxkhbVonib3ChgQWv1l7FZUQ59hEuUWxh9YhkWhHB6f7HNQLDk1HdRcCy5xs3PpL zCO/7yHgu94U/9MJOK8qotCUkebRiJ4WP3GnQ7lqvZ8yYLCDbNL14z18HwA81aTIDPA== X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793689792; 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=CeOxTxKArDbG7RBezkcPwmjmZobpCK7vzK4n/jgzMSk=; b=Hc0dvUT2BcMgugGvrLBdKiHnXMs218GpQkHIWaLYgduOD4M6UMOWLxojnb6CBKz202Yp IM04wNH+sP4yyDxdLtJBClDA41CPeeB2JhCXUTAVbVMLqK7JfXaPvrpJ8KrYJLEHri2wy FDLa+P3OacHmckTr3M0B9fXRF77urTAmfyxWSuDj/Hq5IVMQNiotfrjoue+uADlOik6ov RuCMikXmHQ3hFj+E+4Ji2wnOIHJLjFc/J3DzZngvxogWSFYM7IQ1a03q+cwL9mR79enQl f8LfQ8tDcZUafEfLS/TQk2mIttWnzlPt57lIDQyHCVLtEEI15XfH+bqc42+RLYBJaGw== 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=QWBRh9Os; 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 66A4E606D80A; Tue, 3 Nov 2026 07:09:52 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QWBRh9Os 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=1793689786; b=CwT+dekZQ+JOw3O1ZHbZhJh4ugdJt2/QfhqIO94YgCAHJfnGGq8iGmUw1A7+yB/hvVKT aTzUPk274vl402Z78GkmTHTg2iNSMbs94Rlf9Vi5uz5WIOTvHfi4qauFT41nFGm7vpYUZ 3YKUp3ccZZDXXuzk0pJt+sobg/GubE800XYapQyPBXbBaXDOsaYR1/AV3sCyUuEJYgh2f WEI7QQLsTtVNcjwaB97VqbV84EwpeTAuLokQkHMhqBFSFU9hLZJyTdqSe5nZuQBahfPmq o30j6HCzEa2V2KHQAGfJE0zUYPqPJe384GiX+6LJJLUDDWcMyASbHplHBvV6u+wxnhA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793689786; 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=CeOxTxKArDbG7RBezkcPwmjmZobpCK7vzK4n/jgzMSk=; b=iIltCwSvf91WJQMyWOs0JS6x4smAXDfvdxDGA1g7WjGq8K/q5Z5+7I6ahaEDYcwnSzcD Q3X0nb7wUkj581D3prEfJytT/k527BGHzSMAF378PDNm9UPy43IoS1mL/14ovLQqLkxSj YJCvBAePFECPUIYjMOZK/MepLQO8J6oVU5YtAxuW0Jbwre0mWfLtRNyufBhs0xoPOUa4K Y7r7PXcqtGXaLNAymp41OhKDifftqyQxzZ1ItAR4dyI9Cdu05Yvppp+h8YYM76AysyKz/ C2QbW63EcNHpzZ1x1OwKN/G8+MRTv0YXmCyWw6PjCUxI/buAMx7IJMnOOggflA/niUQ== 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=QWBRh9Os; 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 391B3606A337; Tue, 3 Nov 2026 07:09:46 +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=1793689785; b=kaQgF2eJXY3NysPhIgmGkbLTcz3D8jbCbecKCjSnb9/QM4O7PRuWeJwhLs4Iw6S0Dct0 E5qYGeX2ycet3i6Mf1Swlt4N0AAaqLnFpTHa1l6gvMw7tlQIr0OgWZFCyaTuImhrMS5UB lzbSS4QEf/ryubq7HP9601Cw+jFuzVFejeA0D4LHc6+GxMcRdQQYRnBwgbj0zYgkdp8K2 oLv9PfxzTLCAjB/mxl6d5xucyA5zNEG2Au+VgvQEs0v0vuRYH8mfhVmLLWIbhYaFJafE5 SImOYjal6uT9NA6It1O34oFBnHPUWJSlaix//QYrKTTueeeXa0oH+kqXvnk13OtN97g== X-ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1793689785; 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=CeOxTxKArDbG7RBezkcPwmjmZobpCK7vzK4n/jgzMSk=; b=wNctcA3ZeY0sKRGOKvOZn36kN57r2xVbk3V2wpA3CRmdwgxrAAL6TTwS2GO95jpminW4 X1Kyz3metTEi7ANIRX+XT+J5NGp/R+PAecgnSg/ex1dVj7B4gxj1qdK39++zJlkCLLLZV a/Ev6N3b3J8BmU8lr1pulFzh01LcZOtexFe6SIbIxv8mImR0HsBjPYQ7G88ZAMLXedOQb VpzySBdPn56dgzREwQzQpPLp3cElFpvF9nt/n2/UAtFDzRyeS+gwxXlDddHOa82jMXkCm k6NYmAl+DYJMQqm4TZamIvsIwwBq4Yen3W+zTx/h/ecfGxk1UUi8Gv5rZTBkVOA0IEQ== 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 428A51F00A15; Tue, 3 Nov 2026 07:09:44 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793689785; bh=CeOxTxKArDbG7RBezkcPwmjmZobpCK7vzK4n/jgzMSk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=QWBRh9OsZHSv30tQhvrcCPO+1NoZuWZoJaRjjlTpoYEk5NhrEHBTusa22mSO+/5Ty bs8MOnXO1pTbRrXFjtxppAMwbqKm+pRptgYTX+48I8FhsQtjZyGWWbPOrPrkDJ4Vhm P6SBG1GkuEc7kYLIMV1lqZZuQeCy+f7/ch+cogIIbfOjxdd83b4AKCIIMIM9ZKiYSJ leWgnMqet0msrCdU6/2OzYffvSSfVr0T7HmoFekSx19Yy2+TjTKSSZ8YrmrugEJA8H yIlu0wQVZyRVesvSW6OkFjT7flh3yoWPfkBy3dbcU8Ytr8UBPEIJJWlEQ6LJFaPFfC 0pjuXCNTyPkmQ== X-Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id C3AB246815; Tue, 3 Nov 2026 07:09:43 +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: <20261103-mtu-probing-series-v1-0-a2809e725aaa@gmail.com> X-Cc: netdev@vger.kernel.org, panweiping3@gmail.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Yongjian Wang <echoowall@gmail.com> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1793689782; l=2271; i=echoowall@gmail.com; s=20261026; h=from:subject:message-id; bh=2gf+VU4SH9z04KrX//6g8/b2rrK3/ddnLXUqOlblf40=; b=TOlfFyNL2DDDW1xGgYtpLr4iNZk0fNvFsMg14vidZ9PHezdHAv6RMNSsiy2lZctdsgk2N1uvv xhp2PmGAB+DCXm7VIxQz3oxxsKivpbCrNqmLm7gsDKUMXLgC18gmX0H 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