🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27311

Re: [PATCH v1 net-next 09/10] selftest: packetdrill: Add tests for Generic PLB.

#27311
From: netdev-bot+sashiko
Date: Sat, 05 Dec 2026 09:17
100 lines
11707 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 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/20261204085551.1518105-1-kuniyu%40google.com
Technical Details
Message-ID: <179646227612.3146.5859028652873706023@kernel.org>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377912-linux-kernel-netdev=dewy.ru
References: <20261204085551.1518105-10-kuniyu@google.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377912-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v1 net-next 09/10] selftest: packetdrill: Add tests for
 Generic PLB.
Date: Sat, 05 Dec 2026 09:17:56 +0000
Organization: Usenet Network
Message-ID: <179646227612.3146.5859028652873706023@kernel.org>
References: <20261204085551.1518105-10-kuniyu@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2995675"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:M3Udm4CK3S9JIyvG9bZXBmUz+C8= sha256:h361UAKnzMQJfiehT0SnN+dqg9zDjaI10kefryeAnxU=
	sha1://o3+AWcY+3zw3kGe9N0XerM6jw= sha256:IbPdNSjFjG/CBbmiXDwNdGqHWJuzhop812eFjLsU51A=
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 74665117DB4; Sat,  5 Dec 2026 12:18:19 +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 cypUdT5zMaxU;
	Sat,  5 Dec 2026 12:18:16 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377912-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 9637E117DC0; Sat,  5 Dec 2026 12:18:07 +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 2284429861; Sat,  5 Dec 2026 09:18:01 +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=1796462278;
	b=3g9Cy18+WtVzrJY7o8mz+HZYl+aMCsZN2/WP22ipR537NcprPvQDb3M2T7eYMzTLyzz9
	 UdmQnLMwppIvJc35A9mDSs1Q6ZrhDT2YkKOPOCZQhYvsbK5UDayqQkyI8qEi4MKEt2za4
	 D/UfrmiZZQh/ZosLhfbNIFwz8DmJYkD6aWQvxTIKX6zmc0VWJezWiHlrhKhRzPcLd6m48
	 Q8GsxLcJxssr0CGLO4iDsxix04Hmay0gz9qRnn9hNOsRanchO9dFCDxjL9wJ4fMYwOuIf
	 CgepH/yQDgguufUDoPQyJ62rxICbL+8w7sAq514azY5xI9M0hrx3ZixdjFiyzJH9m9w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796462278;
	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=07K8ff4nnuTVz1YeYaI2NWrDpGvNcHCk5oKsXUpZ/Hw=;
	b=H0+ChRM7yw8WbLXMswM2tLzWfa/Y4bWiPTMKx8PfSHc+OH8mVZnzAfUzOujJ5vicIAWv
	 jPB1OZV8lhsn+f3/SEghE4VKMNYfhlXNbHT++6x6ZM7A5dohOw9iydmZOERzBDZilPrGM
	 aq+rW03Z5aR9gaqwyCJyxXxfvGRvSQUNDGSr/cDyAX9E3pre5sIBPP7BXQb55rIXUhtGW
	 xjLCsNM4EZHtIzeDsQzBjmJozskyrW9J/2GxWCT4C9W+Y3D0YTZ2NZeLqGV6ys15X4xeA
	 VH7mYpqs+vKfZoFP5BQYy0IlY4BuAWnp9M+uVpLz6NQ6SsNDM7s+jmYBB5cVcPulaNQ==
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=P4MOeiD+;
	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 2C607606A33B;
	Sat,  5 Dec 2026 09:17:58 +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=P4MOeiD+
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=1796462277;
	b=xXgWfq3PIYGhJn6SvcFBwfc+Tuhrvx8vI8hHkPjZnBkW6mGyj3e6L96DSw3GYf1ad78p
	 fYjszz6Hbz37O336RqMMTEXR+gnMLmDzv2cHQUoIo/uRS1dhRH0diGVxp14ZczWMB7pCk
	 FzrBOFmAycXOE8r+RV/fQ9Xl2tV6aR5X73YYhB1zG8qHaC+f60tkrhefde5pa/nJrqNLT
	 DZ2xRenBicmB3BEI9Vdj15nZUWBFy3ry/2MtMFXHidhAFp+fuYxgUaixTWj7fOGWzn6au
	 VhvJBclJv/ecX0VLPw0Vgp8dMGGlLYVAffshQ1cyUJaCf9235xQv1m61VQ8kgO+rBZw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796462277;
	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=07K8ff4nnuTVz1YeYaI2NWrDpGvNcHCk5oKsXUpZ/Hw=;
	b=2Z+Tj4N92VoU9ScEpyIVeUTJ+h0Tf1VRFLdl6t1ADP5LisGb6pMtAxSaw2VFBrudXlxf
	 T3WRgEYItZpUdYVJGJ6mJ1whR7Eq3IlEViGDLU6CvZnKQQgZJ3CoLKvgzXzMkJhWj86HN
	 z9JTVcFkggasIKHcYIMRVRmaAWUfLmCpitBvyC6PhA110XS7wgv0/40PYFVHp0XV5Ztol
	 OCZK+FVztzg4SUlwwkgmWhldtMN/bjoRtdOrTRCbUit4+fq0dHuTGEfImAhavmw2ig7dH
	 R8i7Q6nV74kF3u6Vpp+pwXnpKTVQEFJ1VGiC21HS6gssLU1yjmq+gXt5+Fs8i80XGGw==
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=P4MOeiD+;
	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 50D03606A332
	for <netdev@vger.kernel.org>; Sat,  5 Dec 2026 09:17:57 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BFC21F00A07;
	Sat,  5 Dec 2026 09:17:56 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796462277;
	bh=07K8ff4nnuTVz1YeYaI2NWrDpGvNcHCk5oKsXUpZ/Hw=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=P4MOeiD+sOcUzWsSvT50QSBvDtc4QzH6EAzk2I0VmRdPT2fGBzb11mXPlZyZFfwGf
	 hg3UPE5/AiTblIL+MGM+QwuiG5vWbqJRw+gWw5P03DdAvHGx05vqosq1m5PS0wdxfR
	 wgxUMVmnHGXtFKqWNLzolYfifkWKsR7CrACtqYQonn2/zh+6J4kgWyn8un4c2kaF17
	 WNpLJkbIbmlEMF36q6jqYpZHcD1Yb1YQBLfzCPTNZzK1XkoORZqYAeUIVCjRGtPMyC
	 c6uQ7i/ddETNPrAWl4sUNGh8wEG08LlwwhcoYuI+fuUBNpjEn/88l+P2uQorvfJdJp
	 fkb9KscTgSyEQ==
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-10-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