From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.70 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796473133; b=WNxH3JaHtF4xSUBbtpHmDvEcKUFscEOE6fbRGFpnb8BGDamvvTVeSKw3D526OgC3fbRm MD/0HsvCtkA6DXTyxKfSwN2JiGUhaDn+T4yh7v6pcsJ/SJr8/z1RCLTwQJZuPKshJ9dF1 3UdOdPluKKyAKNZSAoXeOf+6RMCJ78xMCXwdVkyGBERjNoG+7KidFYywRGP/X8B2W9yCd ScTpAujCA0GGSUS00b2bFLd1uNLqPMy9qW6plH6VBcUed+IWTcroJxHyNv45fF0ZBAzYF 0eVQ1Dz4gDtoZbmPgN+2ErXXto+e+h5J5G97K77jScQLxcUMVbf7cAd524Nx1impB2Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796473133; 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=dTX/cozaXRGXH/BLP/lFcV6764X7uWWZEyGTx3Tj9ck=; b=xGkdvvRrlgV9YWfE+AlqmNNgwXYreVDSHxYfrr3/H4iJJZX3b0UEF96IQztC0dYT9ex5 KMKrxDp0t+1HD6prKV0Y61wcnp0g4MzpZzUH7pmBJOyNQWlrz1CfKWCYuh1xVgfXwq0lj u9s+QdqS8gl4DaSXl6F6b7tNje3ZwzObOmGcbzbiz6hZdQ626BNVcHpXbHl0d29wXcDyy qKCR6pBaEZbrWaO7oV/WqBbyRDDQJWyA17FHUPxghutuZLKIQO9ALhapMpgWmGXtpxcH3 nJLXRjbn44PGtVcxD5X9tFcVdiJsUkMiXWhohpRnearirI/DzMtjD+2L9u8sFDUVcqA== 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=Cq6hdEdM; arc=none smtp.remote-ip=209.85.216.70 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (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 5E0C3606A689 for ; Sat, 5 Dec 2026 12:18:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5E0C3606A689 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=Cq6hdEdM Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-3b44bcdb096so1893323a91.2 for ; Sat, 05 Dec 2026 04:18:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796473132; x=1797077932; 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=dTX/cozaXRGXH/BLP/lFcV6764X7uWWZEyGTx3Tj9ck=; b=Cq6hdEdM83CoDOvTVLLRknpQ+nm7ESCtxVgPBBMnHnVTfCazxd9tNimXA+OB1NCWUa hGNPARDeWW74dtYPdEplSpC42mRHtOsuG4pjMEjIRLcEYWynRZkibhB1xGODbpPK5xCf /SFSA+0qQPRPywPTEgDhHM3cbXtFUzFFuqBt4Jvxi52Z7NbEiJ3V2ADSeGEkWfzVs5u5 pSAJGTCg3q1M+4fih8BXkfnGE/uAPeLn3qAAzjgfBgKylAzrut4hzBxJgyQrXr77ttTO vCW/7ZbWWPXBo08kWNu2IHc9bytVqEmV5h7qw2n/Opf0nTdhKZ2hx9s/PSqQRmk5QnDW uLmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796473132; x=1797077932; 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=dTX/cozaXRGXH/BLP/lFcV6764X7uWWZEyGTx3Tj9ck=; b=rCpMyEo850A66aRwMOwQgL1GzkqhjJtfG2py+kEuuLGms8CrxrUmsBlWq+iuooKqe9 YHe6zGnSejuF/HOZTu3yrVzG230gQ9/dkf0teIr8ra23huCVp3Ef8ZVXBTDby+0wFyWu GX/SbUIwzM739PehLBgWUibIxWDd0oTGdMVK+zRhuG4gcG6c1SMZk9B3TbslBGK7VhKo aNHPkipQXs7EjZLUFvuf2a6LO+uoY7+mrDGN1gFEsModWl3MpdJMtScVG9dcERLT2vbp lN4Wgkt9jB/IOU2PSeVmMWItjv4DYxujtgtVpkWy9YOgMMKmJSalg3LN42LVjuh+SeGi gv+g== X-Forwarded-Encrypted: i=1; AL+hErH37C0AlSDPSfoefuucXNzqn1ziYB/xsDo0I4otug7fmQMO6n2DPPpdWwi9VzLG6FebMwAHBwY=@vger.kernel.org X-Gm-Message-State: AB4q+uFWaSbgFI2uJ5AUduMbNqBxD+QqNJ0TplsMn9g3A9t9uPZA5qse qr9tlqmjGHXEs2NCsUX3gguFmi8ze434xDAD+vbkeQg9vmikeAGpBq4p4TwliwZK1mrUAIQKAYY U/jp2IQ== X-Received: from pjbbg10.prod.google.com ([2002:a17:90b:d8a:b0:3b4:1ab3:1458]) (user=kuniyu job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:5346:b0:3ac:9c37:942e with SMTP id 98e67ed59e1d1-3b5e065799dmr4808927a91.49.1796473132325; Sat, 05 Dec 2026 04:18:52 -0800 (PST) Date: Sat, 5 Dec 2026 21:18:51 +0900 In-Reply-To: <179646227612.3146.5859028652873706023@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-10-kuniyu@google.com> <179646227612.3146.5859028652873706023@kernel.org> Message-ID: Subject: Re: [PATCH v1 net-next 09/10] selftest: packetdrill: Add tests for Generic PLB. 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:56 +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 three new packetdrill scripts (tcp_plb_loss_rate.pkt, > tcp_plb_loss_rto_suspend.pkt, tcp_plb_loss_tlp.pkt) check the IPv6=E2= =80=A6 > - [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". >=20 > -- >=20 > selftest: packetdrill: Add tests for Generic PLB. >=20 > This adds three packetdrill scripts for Generic PLB. tcp_plb_loss_rate.pk= t > 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_tl= p.pkt > covers TLP: a spurious TLP must not rehash, while a TLP that detects real= loss > must. >=20 > > 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 Recove= ry. > > +// - Phase 1: 4 Fast Recovery rounds (< 5) -> no rehash. > > +// - Phase 2: Record non-app-limited plb_max_rate, then drop cur_rat= e > > +// upon entering the 5th Fast Recovery -> rehash. >=20 > [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. >=20 > In tcp_rate_gen(), plb_max_rate only goes up. It changes only when a > sample is more than 1.125x the current value: >=20 > (u64)rs->delivered << 20 > > (u64)(tp->plb_max_rate + (tp->plb_max_rate >> 3)) * rs->interval_us >=20 > 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. >=20 > 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. >=20 > Could the comment describe that instead? >=20 > > + > > +`./defaults.sh > > +sysctl -q net.ipv4.tcp_early_retrans=3D0 > > +sysctl -q net.ipv4.tcp_plb_loss_rehash_prob=3D255` >=20 > [Severity: Medium] > Should this script set --ip_version=3Dipv6? 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=3Dipv6. >=20 > Every outbound packet is matched with a flowlabel. The rehash shows up as > the flow label changing from 0x1 to 0x2: >=20 > +0 > (flowlabel 0x2) . 5501:5601(100) ack 1 >=20 > The script has no --ip_version line, though. ksft_runner.sh then falls > back to all three families: >=20 > ip_versions=3D$(grep -E '^--ip_version=3D' $script | cut -d '=3D' -f 2) > if [[ -z $ip_versions ]]; then > ip_versions=3D"ipv4 ipv6 ipv4-mapped-ipv6" >=20 > 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. >=20 > 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 ignore= s > the spec instead, the IPv4 runs only check tcpi_rehash. >=20 > Other family-specific scripts in this directory pin the family. For > example, tcp_syncookies_ip6_9k.pkt uses --ip_version=3Dipv6. >=20 > 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. >=20 > [ ... ] >=20 > --=20 > Sashiko AI review =C2=B7 https://netdev-ai.bots.linux.dev/sashiko/#/patch= set/20261204085551.1518105-1-kuniyu%40google.com