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?
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?
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/2026…%40google.com