From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796148630; b=Qlcx9l3tF9C30UwptAJ0MEmnB36goNl424swWV/nKsixnLUfV7A+cV+VMJGNdOKF55iT mcAKpFa1fSjbaPjjLOIxpzDOaj8WVtm4zkBj4wtmL50v1Myaf3w91gqJAMZbPVt6w+OXV bfRiYVKQ310W5FVO9qpZn4tkidHf7bg/N06mBkNq76xLcUQr0lzGdGQrtBZUBCIVxB/9N Lw3Z8QXBj95c15lT/v2Gn9VjwTbfCg7os/TSyJ7rJRyzCL0oeUKJaRPj7MJ2NKiU5CvpI ouQpZ+hXp2m627Q921I9P0kaQvUS69FQHqmns90PoABEgMu4/dzDIhEFoU2M8g0aNzQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796148630; 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=3eXZGuaeBkM99hXXONdOLBFEgPI8JAX9HVjKQLfoJXY=; b=yiAFqJx5vxbvOoPh2KzWJ52ZNMAa0tCg107vjDxzRjQILaksdVagfQWGgr9WvDw5vkGu JkG74IXs2mCinhMMMW74lePfpmiL3Xq8LF08T857NPgsnA7FITA36YV6owVXGnpbA3Q57 /yM07r/AQSO31YG/KEjcG1NABxK2nCCY/7b1ahgEyXYwuB5ImSRqEVoslg7xONmTJQj1K 5T+shoP770W/l2buyONLPuijslw6qTq09h380m6pVrRVabqWgOGBQJ/SMPoAxq7wL6yeO wI8X9mCTG608QvMXaJUctybDinnp+pUkXRJDEP7XapTA2MZvMRbLVNfuGJIEjIA2VAA== 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=hqRdh852; arc=none smtp.remote-ip=100.103.45.18 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 368C4606A327; Tue, 1 Dec 2026 18:10:30 +0000 (UTC) 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=hqRdh852 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2359A1F000C1; Tue, 1 Dec 2026 18:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796148629; bh=3eXZGuaeBkM99hXXONdOLBFEgPI8JAX9HVjKQLfoJXY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=hqRdh852o2Shhj23j2VxA1rxyIGzvnKaVf6e9UHfi47DwrmqWxUgxCoaJGdGYP/2W dgJOVWgUuQ9MIe99mVr9QmnyFRW7uOc3HhAv+fCU5FvxQd7N0zsUzl6dgWrc79RJYm UhUhXnUoCz6C7Kq/oMWVup9m1JvnyNOVrLyerAN9MTH2nSjzT9IsDRgjdP0Vmmqm3/ MLJFDq/nN0PrTZfByscAA5D7PXpK+yw6s0+bksqtNJNVjmuNam/bvRYvJ1hd9eNQtw RwtPBMiIvOgYKBttnGM4vx/WJKD/wt3wtcIkYnKimcaZfbdUrLZ5VXwGS/vKSF4jST kOFRAqT9veIFQ== Subject: Re: [PATCH net-next v2 2/4] selftests: drv-net: add a closed-loop request-response test From: netdev-bot+sashiko@kernel.org To: sdf.kernel@gmail.com Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch, edumazet@kernel.org, shuah@kernel.org, sdf@fomichev.me, bjorn@kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Date: Tue, 01 Dec 2026 18:10:28 +0000 Message-ID: <179614862869.3146.5984884972810463913@kernel.org> In-Reply-To: <20261130174609.314114-3-sdf.kernel@gmail.com> References: <20261130174609.314114-3-sdf.kernel@gmail.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 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] `closed_loop()` and `_report()` in tools/testing/selftests/drivers/net/perf/rr.py pass the request-… -- selftests: drv-net: add a closed-loop request-response test This adds rr.py. It uses kperf to run back-to-back 1 KiB request-response transactions over a single connection. It then reports the transaction rate, the latency percentiles and the maximum latency as ksft metrics. > diff --git a/tools/testing/selftests/drivers/net/perf/rr.py b/tools/testing/selftests/drivers/net/perf/rr.py > new file mode 100755 > index 0000000000000..1dff0c4763909 > --- /dev/null > +++ b/tools/testing/selftests/drivers/net/perf/rr.py [ ... ] > +def _report(result) -> None: > + ksft_metric("rate", result.rate, goal="higher") > + ksft_metric("latency_p25", result.p25, goal="lower") > + ksft_metric("latency_p50", result.p50, goal="lower") > + ksft_metric("latency_p90", result.p90, goal="lower") > + ksft_metric("latency_p99", result.p99, goal="lower") > + ksft_metric("latency_p999", result.p999, goal="lower") > + ksft_metric("latency_p9999", result.p9999, goal="lower") > + ksft_metric("latency_max", result.lat_max, goal="lower") > + > + > +def closed_loop(cfg) -> None: > + """Measure back-to-back transactions.""" > + with KperfRunner(cfg) as runner: > + _report(runner.run(RR_ARGS)) [Severity: Medium] If kperf produces no request-response data, can closed_loop() still report PASS? In tools/testing/selftests/drivers/net/lib/py/kperf.py, every request-response field of KperfResult defaults to None: rate: float | None = None p25: float | None = None ... lat_max: float | None = None KperfRunner.parse() fills these fields only when _RPS_RE or _LAT_RE matches a line in the Source section. Its only completeness check covers throughput: rr.setdefault("rate", float(match.group(1))) ... rr.setdefault(key, float(value)) ... if not all(throughput.values()): raise ValueError("incomplete kperf result") ksft_metric() does not validate value either. json.dumps() turns None into null, and metrics do not affect the test result. So the test would pass if kperf printed no RPS line or no latency lines in the Source section. That could happen if a kperf build ignores --time-stats 2, uses a different output format or unit, or prints the stats under Target. The output would then be eight ktap-metric-json records with "value":null. Would it make sense to check these fields in closed_loop() or _report()? lib.py already exports ksft_not_none(), or rr.py could raise KsftFailEx when a field is missing. Nothing later in the series changes rr.py, kperf.py or ksft.py. [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130174609.314114-1-sdf.kernel%40gmail.com