From: Kuniyuki Iwashima <kuniyu@google.com>
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
Subject: Re: [PATCH v1 net-next 10/10] selftest: net: Disable Generic PLB in ecmp_rehash.sh.
Date: Sat, 5 Dec 2026 21:23:46 +0900 [thread overview]
Message-ID: <axQByemE9ZTYUNNo@google.com> (raw)
In-Reply-To: <179646227732.3146.9625968889674131144@kernel.org>
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.
>
> 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?
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.
>
> 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
next prev parent reply other threads:[~2026-12-05 12:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 8:54 [PATCH v1 net-next 00/10] tcp: Introduce Generic PLB Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 01/10] tcp: Return early when tcp_plb_check_rehash() does not rehash a flow Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 02/10] tcp: Don't call get_random_u32_below(0) in tcp_plb_update_state_upon_rto() Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 03/10] tcp: Move struct tcp_plb_state to struct tcp_sock Kuniyuki Iwashima
2026-12-04 10:34 ` David Laight
2026-12-04 12:33 ` Kuniyuki Iwashima
2026-12-05 9:17 ` netdev-bot+sashiko
2026-12-04 8:54 ` [PATCH v1 net-next 04/10] tcp: Call tcp_plb_update_state_upon_rto() after rehash in tcp_write_timeout() Kuniyuki Iwashima
2026-12-05 9:17 ` netdev-bot+sashiko
2026-12-04 8:54 ` [PATCH v1 net-next 05/10] tcp: Rename tcp_plb_check_rehash() to tcp_plb_check_rehash_ecn() Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 06/10] tcp: Factorise tcp_plb_rehash() Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 07/10] tcp: Lower tcp_plb_suspend_rto_sec default Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 08/10] tcp: Introduce Generic PLB Kuniyuki Iwashima
2026-12-05 9:17 ` netdev-bot+sashiko
2026-12-05 12:13 ` Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 09/10] selftest: packetdrill: Add tests for " Kuniyuki Iwashima
2026-12-05 9:17 ` netdev-bot+sashiko
2026-12-05 12:18 ` Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 10/10] selftest: net: Disable Generic PLB in ecmp_rehash.sh Kuniyuki Iwashima
2026-12-05 9:17 ` netdev-bot+sashiko
2026-12-05 12:23 ` Kuniyuki Iwashima [this message]
2026-12-04 9:03 ` [PATCH v1 net-next 00/10] tcp: Introduce Generic PLB netdev-bot+sinfo
2026-12-04 9:29 ` Kuniyuki Iwashima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=axQByemE9ZTYUNNo@google.com \
--to=kuniyu@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=ncardwell@google.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=ycheng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox