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
Subject: Re: [PATCH net-next 2/4] selftests: drv-net: add a closed-loop request-response test
Date: Tue, 24 Nov 2026 17:43:02 +0000 [thread overview]
Message-ID: <179554218233.3135.9733987891875533759@kernel.org> (raw)
In-Reply-To: <20261123174120.505808-3-sdf@fomichev.me>
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] rr.py's closed_loop()/_report() pass the request-response
fields of KperfResult (rate, p25, p50, p90, p99, p999, p9999, lat_max)…
- [Low] The commit author is 'Stanislav Fomichev <sdf.kernel@gmail.com>',
but the only Signed-off-by is 'Stanislav Fomichev <sdf@fomichev.me>'.
--
selftests: drv-net: add a closed-loop request-response test
This adds rr.py to the drv-net perf selftests. It runs kperf over one
connection with 1 KiB requests and responses, then reports the
transaction rate and kperf's latency percentiles and maximum as ksft
metrics.
> Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
[Severity: Low]
This isn't a bug, but the author address and the sign-off address do
not match:
Author: Stanislav Fomichev <sdf.kernel@gmail.com>
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
The body has no in-body From: line either, so checkpatch will report
FROM_SIGN_OFF_MISMATCH. The other patches in the series have the same
mismatch, including "selftests: drv-net: kperf: support
request-response tests", "selftests: drv-net: add a kperf stream test"
and "selftests: drv-net: remove the iperf performance test".
Could the author and the Signed-off-by use the same address?
> 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]
Can closed_loop() pass even though it never measured a rate or any
latency?
In KperfResult in drivers/net/lib/py/kperf.py, the request-response
fields default to None:
rate: Optional[float] = None
p25: Optional[float] = None
...
lat_max: Optional[float] = None
KperfRunner.parse() only fills them through rr.setdefault() when
_RPS_RE or _LAT_RE matches a line in the Source section. Its only
completeness check covers throughput:
if not all(throughput.values()):
raise ValueError("incomplete kperf result")
return KperfResult(sum(throughput["Source"]),
sum(throughput["Target"]), **rr)
Suppose kperf-client prints the Source Tx and Target Rx Gbps lines but
no "N RPS" line and no pXX:Nus or max:Nus tokens. That could happen
with a kperf build whose output does not match the regexes, or one
that ignores --time-stats 2. Each field passed to ksft_metric() is
then None.
ksft_metric() uses json.dumps(..., allow_nan=False), which rejects
only NaN and Inf. None is written as "value":null without an error.
Metrics also do not affect the test result, so closed_loop() is
reported as ok.
Consumers of the metric output then see null, while the ksft_metric()
docstring ("value - the measured number") and README.rst promise a
number. The later patches in the series do not change rr.py or
KperfRunner.parse(), so this is still the case at the end of the
series.
Would it make sense to check each field with ksft_not_none(), or to
raise KsftFailEx or KsftSkipEx when a field is None, before reporting
it?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261123174120.505808-1-sdf%40fomichev.me
next prev parent reply other threads:[~2026-11-24 17:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 17:41 [PATCH net-next 0/4] selftests: replace iperf with kperf and add RR Stanislav Fomichev
2026-11-23 17:41 ` [PATCH net-next 1/4] selftests: drv-net: kperf: support request-response tests Stanislav Fomichev
2026-11-24 17:43 ` netdev-bot+sashiko
2026-11-23 17:41 ` [PATCH net-next 2/4] selftests: drv-net: add a closed-loop request-response test Stanislav Fomichev
2026-11-24 17:43 ` netdev-bot+sashiko [this message]
2026-11-23 17:41 ` [PATCH net-next 3/4] selftests: drv-net: add a kperf stream test Stanislav Fomichev
2026-11-24 17:43 ` netdev-bot+sashiko
2026-11-23 17:41 ` [PATCH net-next 4/4] selftests: drv-net: remove the iperf performance test Stanislav Fomichev
2026-11-24 17:43 ` netdev-bot+sashiko
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=179554218233.3135.9733987891875533759@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox