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 09/10] selftest: packetdrill: Add tests for Generic PLB.
Date: Sat, 5 Dec 2026 21:18:51 +0900 [thread overview]
Message-ID: <axP_6Xq5lu4ZXQIQ@google.com> (raw)
In-Reply-To: <179646227612.3146.5859028652873706023@kernel.org>
On Sat, 05 Dec 2026 09:17:56 +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 three new packetdrill scripts (tcp_plb_loss_rate.pkt,
> tcp_plb_loss_rto_suspend.pkt, tcp_plb_loss_tlp.pkt) check the IPv6…
> - [Low] The header comment of tcp_plb_loss_rate.pkt says Phase 2 will
> "Record non-app-limited plb_max_rate, then drop cur_rate".
>
> --
>
> selftest: packetdrill: Add tests for Generic PLB.
>
> This adds three packetdrill scripts for Generic PLB. tcp_plb_loss_rate.pkt
> covers a rehash triggered by a rate drop in fast recovery, and
> tcp_plb_loss_rto_suspend.pkt covers suspension after RTO. tcp_plb_loss_tlp.pkt
> covers TLP: a spurious TLP must not rehash, while a TLP that detects real loss
> must.
>
> > diff --git a/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rate.pkt b/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rate.pkt
> > new file mode 100644
> > index 0000000000000..2e81fde34e606
> > --- /dev/null
> > +++ b/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rate.pkt
> > @@ -0,0 +1,83 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +//
> > +// Test TCP Generic PLB: rate-drop triggered PLB rehash in Fast Recovery.
> > +// - Phase 1: 4 Fast Recovery rounds (< 5) -> no rehash.
> > +// - Phase 2: Record non-app-limited plb_max_rate, then drop cur_rate
> > +// upon entering the 5th Fast Recovery -> rehash.
>
> [Severity: Low]
> The header says Phase 2 will "Record non-app-limited plb_max_rate". Is
> that accurate?
"non-app-limited" is stale comment from a draft version, I'll remove it.
>
> In tcp_rate_gen(), plb_max_rate only goes up. It changes only when a
> sample is more than 1.125x the current value:
>
> (u64)rs->delivered << 20 >
> (u64)(tp->plb_max_rate + (tp->plb_max_rate >> 3)) * rs->interval_us
>
> The high plb_max_rate is already set during setup, by the ACKs of 1:1001
> and 1001:3001. The Phase 2 samples (9 segments / ~10ms, then 1 segment /
> 50ms) are too low to change it.
>
> What Phase 2 actually records is the low non-app-limited sample in
> tp->rate_delivered / tp->rate_interval_us. tcp_plb_check_rehash_loss()
> reads that as cur_rate.
>
> Could the comment describe that instead?
>
> > +
> > +`./defaults.sh
> > +sysctl -q net.ipv4.tcp_early_retrans=0
> > +sysctl -q net.ipv4.tcp_plb_loss_rehash_prob=255`
>
> [Severity: Medium]
> Should this script set --ip_version=ipv6?
packetdrill ignores flowlabel annotation in IPv4, so it passes
without failure. That said, we don't need to cover ipv4.
I'll add --ip_version=ipv6.
>
> Every outbound packet is matched with a flowlabel. The rehash shows up as
> the flow label changing from 0x1 to 0x2:
>
> +0 > (flowlabel 0x2) . 5501:5601(100) ack 1
>
> The script has no --ip_version line, though. ksft_runner.sh then falls
> back to all three families:
>
> ip_versions=$(grep -E '^--ip_version=' $script | cut -d '=' -f 2)
> if [[ -z $ip_versions ]]; then
> ip_versions="ipv4 ipv6 ipv4-mapped-ipv6"
>
> So the script runs three times. In the ipv4 and ipv4-mapped-ipv6 runs the
> packets on the wire are IPv4, and IPv4 has no flow label field.
>
> If packetdrill rejects or fails to match a (flowlabel N) spec on IPv4
> packets, would 2 of the 3 ktap results fail for this script? If it ignores
> the spec instead, the IPv4 runs only check tcpi_rehash.
>
> Other family-specific scripts in this directory pin the family. For
> example, tcp_syncookies_ip6_9k.pkt uses --ip_version=ipv6.
>
> tcp_plb_loss_rto_suspend.pkt and tcp_plb_loss_tlp.pkt have the same
> problem. Both match flow labels on every outbound packet and neither has
> an --ip_version line. The later ecmp_rehash.sh change in this series
> doesn't touch these scripts, so the problem is still there at the end of
> the series.
>
> [ ... ]
>
> --
> 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:18 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 [this message]
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
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=axP_6Xq5lu4ZXQIQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.