๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27312

Re: [PATCH v1 net-next 10/10] selftest: net: Disable Generic PLB in ecmp_rehash.sh.

#27312
From: netdev-bot+sashiko
Date: Sat, 05 Dec 2026 09:17
106 lines
12315 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.

Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 1

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The patch hides a kernel-side interaction between Generic PLB
  and the receiver's duplicate-data rehash heuristic; it does not fix it.
- [Low] Series ordering / bisectability: ecmp_rehash.sh is flaky in two
  intermediate commits.

--

selftest: net: Disable Generic PLB in ecmp_rehash.sh.

This commit sets net.ipv4.tcp_plb_loss_rehash_prob=0 in each netns that
setup() creates in ecmp_rehash.sh. Generic PLB is on by default, and after
repeated fast recoveries it can rehash the client socket. That rehash makes
test_ecmp_dst_rebuild_consistency() and
test_ecmp_syncookie_path_consistency() flaky.

> diff --git a/tools/testing/selftests/net/ecmp_rehash.sh b/tools/testing/selftests/net/ecmp_rehash.sh
> index f05a6c8edd2a8..a2b732cf24189 100755
> --- a/tools/testing/selftests/net/ecmp_rehash.sh
> +++ b/tools/testing/selftests/net/ecmp_rehash.sh
> @@ -186,6 +186,7 @@ setup()
>  		ip netns exec "$ns" sysctl -qw net.ipv6.conf.default.accept_dad=0
>  		ip netns exec "$ns" sysctl -qw net.ipv6.conf.all.forwarding=1
>  		ip netns exec "$ns" sysctl -qw net.core.txrehash=1
> +		ip netns exec "$ns" sysctl -qw net.ipv4.tcp_plb_loss_rehash_prob=0

[Severity: Low]
Should this line be folded into "tcp: Introduce Generic PLB."?

That commit turns the feature on by default in tcp_sk_init():

	net->ipv4.sysctl_tcp_plb_loss_rehash_prob = 128;

It also adds tcp_plb_check_rehash_loss() calls to tcp_enter_recovery() and
to the TLP loss branch of tcp_process_tlp_ack().

This commit message says that default makes ecmp_rehash.sh flaky. The
test-side change only lands two commits later, though. That leaves two
commits where the selftest can fail at random, which can confuse bisects:
"tcp: Introduce Generic PLB." and "selftest: packetdrill: Add tests for
Generic PLB.".

The sysctl only exists from "tcp: Introduce Generic PLB." onward, so this
line can't move earlier by itself. Could it be folded into that commit?
Alternatively, the feature could land default-off, with the default flipped
after this selftest change.

[Severity: Medium]
Does this hide a kernel-side interaction rather than fix it?

tcp_enter_recovery() rehashes before the fast retransmit goes out:

	tcp_set_ca_state(sk, TCP_CA_Recovery);

	tcp_plb_check_rehash_loss(sk);

So the fast retransmit is the first segment to carry the new sk_txhash and
IPv6 flow label. The recovery may be spurious, for example because of the
reordering the commit message describes. In that case the peer already has
the data and goes through:

tcp_data_queue()
  tcp_rcv_spurious_retrans()

icsk_ack.lrcv_flowlabel was saved from earlier in-order data, so the flow
label no longer matches. The peer then takes this branch:

	if (inet_csk(sk)->icsk_ca_state != TCP_CA_Loss &&
	    skb->protocol == htons(ETH_P_IPV6) &&
	    (tcp_sk(sk)->inet_conn.icsk_ack.lrcv_flowlabel !=
	     ntohl(ip6_flowlabel(ipv6_hdr(skb)))) &&
	    __sk_rethink_txhash_reset_dst(sk)) {
		NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPDUPLICATEDATAREHASH);
	}

The comment above this heuristic says it assumes the sender suffered an RTO
and that our ACKs are not reaching the other side. With Generic PLB on by
default, a sender-side loss-PLB repath would have two effects on the peer:

- It repaths its ACK direction even though nothing is wrong with that path.

- It bumps TcpDuplicateDataRehash for events that are not ACK-path
  failures. ecmp_rehash.sh itself reads that counter as evidence of an
  ACK-path failure.

No commit in the series changes tcp_rcv_spurious_retrans(). This patch only
sets tcp_plb_loss_rehash_prob=0 inside the test netns. As a result, IPv6
ECMP deployments that use auto flow labels get this behaviour by default.

Should the peer heuristic be kept from firing on flow label changes caused
by PLB? If not, should the changelog of "tcp: Introduce Generic PLB."
describe this as accepted behaviour?

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204085551.1518105-1-kuniyu%40google.com
Technical Details
Message-ID: <179646227732.3146.9625968889674131144@kernel.org>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377913-linux-kernel-netdev=dewy.ru
References: <20261204085551.1518105-11-kuniyu@google.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377913-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v1 net-next 10/10] selftest: net: Disable Generic PLB in
 ecmp_rehash.sh.
Date: Sat, 05 Dec 2026 09:17:57 +0000
Organization: Usenet Network
Message-ID: <179646227732.3146.9625968889674131144@kernel.org>
References: <20261204085551.1518105-11-kuniyu@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2995729"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:+k1UOK4db2/usR+6R1PsxvE2yzE= sha256:qdj4GBs0j4xwx3XSnkPFVhNvFocTTcYQLdlwYminSDM=
	sha1:Q5E/9E83yvj9YyxR0ONeGvShfDw= sha256:zceslDp4QazP3vqll/WsQK0lOMbKjdHYsCI0AQr3xqE=
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 82BD4117DC0; Sat,  5 Dec 2026 12:18:22 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.642
X-Spam-Status: No, score=-3.642 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.142, 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 xomB1kLTtY0s;
	Sat,  5 Dec 2026 12:18:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377913-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 676F6117D6D; Sat,  5 Dec 2026 12:18:11 +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 7E2302A375; Sat,  5 Dec 2026 09:18:02 +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=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796462279;
	b=IK4JP8lFff6glvilv/chdBgZE3NDR0KdZLE4O2L5iZrdwZw5vX3yCXLfAOjK0GoB3dCq
	 yQ9ZtdVGan1ZT3ozNTeQENAw+X/PRwePP3oalVokcaILacm650wtze1hTUsXcPzWZrJWQ
	 lMu6tfA6u7SbenFsa+/Irz4YoY0QaX3Pv/X2cIv/RqlMp6Gd5PcbXHbz8CrO/dEdB5nOv
	 BSq2CUuNz+4EwGrQDsXOUaPQyUYpCgr/Q67dda90lvJE6zGlFjMrcZ4NbZVMb6NDOMh0C
	 GIUC0RUdhtzgLScsrjS/nBd8K9aRfQRZNra3NW3o5PpJqW3PnupB3I3qa3XIz7q7JdA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796462279;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=6EuWVyz4rDJV9NfQeDoFh0MeCZtts2WqLAW07slJnds=;
	b=TP6qlnuDB5Gp8KiluGXUHWRWnq2FLOXu9S4Adaz1JqfozjlN2dutN025jhi3P5d8EBT5
	 PfzWpTvluc0vEq+bteL6VTKx6q4DXjAAYML9Wz2i37nO0d33clMimgy/aCyOf2dp/Ay5S
	 xKSeKuR58TQr+b6qBVXrVni8aQCo537khjc2TWeSOHgJfRoqQVzZQ+IzXwVyh1ee6hrIX
	 YMylA3K3MAtlUBGk4bmRmyGtn4QKC3UBaDaSb04b5L2VEhGv4HCOExDAZ9/xBovIGVqCN
	 5t7e5kNAFpDceQ38vBa6nRjcPZou/3ad/0kjTSdGvxiHMOnDWHmXyBixFnUxmnGEv8w==
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=HqZEIqw4;
	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 8C8C5606A682;
	Sat,  5 Dec 2026 09:17:59 +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=HqZEIqw4
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796462278;
	b=LH/J0kfLe9VvCUUHJ6qaGFJ3Xe3misA3ZjmnkAf8DH0HhcN/iiUuVQAqke33uapCXkvi
	 k5CTs9wBMJ2vdZySqQJEUS4JZtlnSVMPcFZwHNmk5ZnZdGcErJNensThQBYA8jOFivIqH
	 ehCNHe2nUpeW6uP6Zdgnf3JybXM9UOI4zlnqqRY/CpUJmW6eKXUrx+NYgEjKTyNVF1Ve1
	 +NEaR9IKKzyGD2R+c6brLbXlj8vUSCBHdu2Hi7C39xweBQULK+4QmBlf1kJ2EUgbYT2wz
	 TQfcY97CdDPrflGrWl34ey2khj6A+hfrp+E+9lqi575NmVaQQEwrYz6uqJyYneZoQVg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796462278;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=6EuWVyz4rDJV9NfQeDoFh0MeCZtts2WqLAW07slJnds=;
	b=wiua6w5W/pUbYXAQiZuSVPOb9LZd/ZnISer1Wnk9gLHL1X0+JjxiJ8QfHEX84tSAuVyS
	 NolvJid2QSkKqc3t6/qGJYVbvedTGkpZZNj1j7sPtZnnG/Gl4URjd/IYH+uuCK+69Li+p
	 n1qUv8irLjZhPAXBSR08MNuXvr11NceQ8isbqaLCGbUhwZk1vwtO4GMYCKPzn7HbJVGjx
	 pJ3FW6Pq16/Q/LsZP/N39wcr1T8cXSGGSIKUc87JIcJD6xswOxKIZ3D3MMokGvlpJeJ/K
	 XnGfb/ESp3+cLV/a+j6MYYk5p2mVFxJYvTww2NXkHg5Gd2QNxdvqhTSqRY8YVDf9a1w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HqZEIqw4;
	arc=none 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 ADA39606A683
	for <netdev@vger.kernel.org>; Sat,  5 Dec 2026 09:17:58 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5FF41F0092B;
	Sat,  5 Dec 2026 09:17:57 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796462278;
	bh=6EuWVyz4rDJV9NfQeDoFh0MeCZtts2WqLAW07slJnds=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=HqZEIqw4abPRAYrtFRvS04NRL6FmiS1VjIu4DxsuJYmadFtIYXESo1y6BWQM0sWK3
	 uL2BFTbdK/5tZh8eh4xCC0vc22RNtzoVCkpVg/4F8sRwv6O26tq+0ne/X/1E6RTPIv
	 LM1TFqLhgzqi1PFFbyx0BSjvDVXVFhnkGzZ2ttFokk8cktmy1mtOVUQWuXKECDw7yA
	 RJHELHmao5HboiASEZlf2O86Wlyk6pULqrce7VmS7g+S/4u8UBZT9fCsJ1l4hhMiVB
	 vWy7R9Q5xNjUAMR+oIwTjVcsn8b8P3PWglOZyWqsmTT8oHEaf4nv+jYNk4Umd0gioj
	 X2dFA7CSsV/Uw==
X-Cc: edumazet@kernel.org, ncardwell@google.com, davem@davemloft.net,
 kuba@kernel.org, pabeni@redhat.com, willemb@google.com, horms@kernel.org,
 ycheng@google.com, kuni1840@gmail.com, netdev@vger.kernel.org
X-In-Reply-To: <20261204085551.1518105-11-kuniyu@google.com>
X-sashiko-severity: Medium
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