From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796473428; b=TVc7UhpRBJvVCjzfEmOBCkPKWL1Ur0Kp1UNwaGL69tIL5SdPmKQP4rjf0iQqgFZzGreL WpmzOhvfaYDLtzMq3Us3aXhMlWqf+CK1PF62Cnr2v2oxNBUY2H5Ysra0TgDX1IDWiXhDK LPKdqBgOgPGst23mefw74ynXLpBZgIRZUFL+BNz+kv4VVvoiWnbY1Ssg5yd1d5hLsE4/N lHYnb0fkSlM7csYlxSMQrWPddi83y9m9eN8zk+dyMPzRy1ugd7nse3ShfD9tJljXVYY05 PWAYROeCSozauFqGUUWFoJxiGr1f4w7GGSS6RzcIztjwFfcd6oP+YbvNc5FgM0a6gmw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796473428; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding; bh=O0r/EZMuO1TkZ2ryAC6+0dAjGg61gNfZtr/Tdaz23YY=; b=wBIBzx8/1iN8L91sA7GW8glh0J3Y4G8e5hlWM4p0LWK7EOiFQOhYUBtiza/ve8ulsWIL 1hcEl8EYdjuLe2Uw4tPviDqPot+qpBj8lVyTJ605pxUu8QF6ecgCgUaSY/iSQfmJFx9vT qtfSJNiA3bNGPB39jnd/f9jDKZk2foTCXyvR5S2IoyTnPKKe72supJe96MLcwvZSUr5h0 ezioT++kctqzlKl7FO/EcG9l7LCiDYA39yohfuprnltsAW8+lXCiUVg3gZWcT1QxTYczI DQtP7OK+f9o5h9rGFfPrfS4mJaOcg2j1Lfq4ZzthAtgwBh0isOXfqUdWiAQyxxkmqsw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--kuniyu.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=boqlLDXX; arc=none smtp.remote-ip=209.85.214.200 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21D61606A333 for ; Sat, 5 Dec 2026 12:23:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 21D61606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--kuniyu.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=boqlLDXX Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2f03aa5ff3bso23060765ad.1 for ; Sat, 05 Dec 2026 04:23:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796473427; x=1797078227; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=O0r/EZMuO1TkZ2ryAC6+0dAjGg61gNfZtr/Tdaz23YY=; b=boqlLDXXmOBouIkdOOA2K4aWBdWhyF+rtC8CZPsSqXSsP1qwSWZjwrjb2rMOOM8ON0 bpuU9tWs6WaJIbZ5heUrj2ZVQ2hLwv8qE/1xXHIaK6fDJj8oOgGKOTYVRRi2yipotnEr Y75r/RSesLwNDF8PWDmdQfJ6ETFz1J/SYt7NkyP8tDOfBFLaXlOW4gQ0+30kZmKijyQQ jyz06SRzmWG4CA7Cr7rZpmCpyuf2s7JdiT/dML8SYSABnJFIL4Q0nbQ8xb6s8ZcOnL8G avNu85DnhqBSGHfEJsb5HdAKcgoAVCLTc+pu6PM0evI6ySJGZyTcjjUb2THro69Gwu7t KRsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796473427; x=1797078227; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=O0r/EZMuO1TkZ2ryAC6+0dAjGg61gNfZtr/Tdaz23YY=; b=Ltf2X5nCauGZRjwB4P4vIMuEt9kn/131bVkzdAKY2seS5kDOxF4ODhkMr0DN/UKBP1 zn5OOOBqU9ni7sGg2sUJJ6KX8/DxQGfbZvSpjZujO0oIVtgqXwUGHn3Q4pqJHzAIr2/K hQGIAv7iRAisD8IKR0d+oMLwkVJ2OtDqFtwexETaB5+do4N5ukzfdxtkZhckUjDEeiYt XJnEJUHq28qozxpxYqn3TpJsbGen1nphIcHSmVqZYq+Nh4vP7THhf1A9bVPybdCKQnez c7LJg0E/RdwxvSnZxee1CBtp1SRPu1I+xRGbUCxmDfTbdTdGFxnDgNeXjKwPsggwQueA F/iA== X-Forwarded-Encrypted: i=1; AL+hErF3RDJIXzypbeYdZkJ8Y0vasTVWnxnurH3wgfXIayDa91Of8giwe3LFaNZej+WwV/HnzR1NHQk=@vger.kernel.org X-Gm-Message-State: AB4q+uHM20A2AB7tEIXEzZPINaYSS/1QWuNJ3Muuzi/gZDw/g88p/LP/ WXUgg3jWMXfO6IKkUuq9oTaBLkg0xtZ2y3ruJynguteQWm1K+bUvB5vLtg4WKn7LJziz9OVc0N9 8AWLAZw== X-Received: from plzu2.prod.google.com ([2002:a17:902:82c2:b0:2f0:4052:30d0]) (user=kuniyu job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:2412:b0:2f0:5e4a:deeb with SMTP id d9443c01a7336-2f1ba1eb0f0mr43927855ad.47.1796473427259; Sat, 05 Dec 2026 04:23:47 -0800 (PST) Date: Sat, 5 Dec 2026 21:23:46 +0900 In-Reply-To: <179646227732.3146.9625968889674131144@kernel.org> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261204085551.1518105-11-kuniyu@google.com> <179646227732.3146.9625968889674131144@kernel.org> Message-ID: Subject: Re: [PATCH v1 net-next 10/10] selftest: net: Disable Generic PLB in ecmp_rehash.sh. From: Kuniyuki Iwashima To: netdev-bot+sashiko@kernel.org 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sat, 05 Dec 2026 09:17:57 +0000, netdev-bot+sashiko@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 2 potential > issue(s) to consider. >=20 > Critical: 0 =C2=B7 High: 0 =C2=B7 Medium: 1 =C2=B7 Low: 1 >=20 > 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 patchwor= k > know by including "pw-bot: cr" as a separate line at the end of your repl= y > (one such reply per series is enough). >=20 > - [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. >=20 > -- >=20 > selftest: net: Disable Generic PLB in ecmp_rehash.sh. >=20 > This commit sets net.ipv4.tcp_plb_loss_rehash_prob=3D0 in each netns that > setup() creates in ecmp_rehash.sh. Generic PLB is on by default, and afte= r > repeated fast recoveries it can rehash the client socket. That rehash mak= es > test_ecmp_dst_rebuild_consistency() and > test_ecmp_syncookie_path_consistency() flaky. >=20 > > 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=3D0 > > ip netns exec "$ns" sysctl -qw net.ipv6.conf.all.forwarding=3D1 > > ip netns exec "$ns" sysctl -qw net.core.txrehash=3D1 > > + ip netns exec "$ns" sysctl -qw net.ipv4.tcp_plb_loss_rehash_prob=3D0 >=20 > [Severity: Low] > Should this line be folded into "tcp: Introduce Generic PLB."? >=20 > That commit turns the feature on by default in tcp_sk_init(): >=20 > net->ipv4.sysctl_tcp_plb_loss_rehash_prob =3D 128; >=20 > It also adds tcp_plb_check_rehash_loss() calls to tcp_enter_recovery() an= d > to the TLP loss branch of tcp_process_tlp_ack(). >=20 > 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.". >=20 > 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 flipp= ed > after this selftest change. >=20 > [Severity: Medium] > Does this hide a kernel-side interaction rather than fix it? No. The peer cannot distinguish a PLB-triggered flow label change from an RTO-triggered one in tcp_rcv_spurious_retrans(). Existing ECN-PLB (tcp_plb_check_rehash_ecn()) already has the exact same behaviour when it changes the flow label outside TCP_CA_Loss. This only occurs when a spurious fast recovery coincides with a probabilistic PLB check (every 5th loss recovery) and simply rehashes the peer's ACK path. Also, ecmp_rehash.sh must disable Generic PLB regardless of tcp_rcv_spurious_retrans() because test_ecmp_dst_rebuild_consistency() expects the client flow to stay on the same ECMP path and fails from client-side TCPPLBRehash alone. >=20 > tcp_enter_recovery() rehashes before the fast retransmit goes out: >=20 > tcp_set_ca_state(sk, TCP_CA_Recovery); >=20 > tcp_plb_check_rehash_loss(sk); >=20 > So the fast retransmit is the first segment to carry the new sk_txhash an= d > IPv6 flow label. The recovery may be spurious, for example because of the > reordering the commit message describes. In that case the peer already ha= s > the data and goes through: >=20 > tcp_data_queue() > tcp_rcv_spurious_retrans() >=20 > icsk_ack.lrcv_flowlabel was saved from earlier in-order data, so the flow > label no longer matches. The peer then takes this branch: >=20 > if (inet_csk(sk)->icsk_ca_state !=3D TCP_CA_Loss && > skb->protocol =3D=3D htons(ETH_P_IPV6) && > (tcp_sk(sk)->inet_conn.icsk_ack.lrcv_flowlabel !=3D > ntohl(ip6_flowlabel(ipv6_hdr(skb)))) && > __sk_rethink_txhash_reset_dst(sk)) { > NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPDUPLICATEDATAREHASH); > } >=20 > The comment above this heuristic says it assumes the sender suffered an R= TO > 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= : >=20 > - It repaths its ACK direction even though nothing is wrong with that pat= h. >=20 > - 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. >=20 > No commit in the series changes tcp_rcv_spurious_retrans(). This patch on= ly > sets tcp_plb_loss_rehash_prob=3D0 inside the test netns. As a result, IPv= 6 > ECMP deployments that use auto flow labels get this behaviour by default. >=20 > Should the peer heuristic be kept from firing on flow label changes cause= d > by PLB? If not, should the changelog of "tcp: Introduce Generic PLB." > describe this as accepted behaviour? >=20 > --=20 > Sashiko AI review =C2=B7 https://netdev-ai.bots.linux.dev/sashiko/#/patch= set/20261204085551.1518105-1-kuniyu%40google.com