From: netdev-bot+sashiko@kernel.org
To: daniel.zahka@gmail.com
Cc: kuba@kernel.org, willemdebruijn.kernel@gmail.com,
davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com,
horms@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org,
rdunlap@infradead.org, donald.hunter@gmail.com,
andrew+netdev@lunn.ch, shuah@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kselftest@vger.kernel.org, willemb@google.com
Subject: Re: [PATCH net-next v4 5/5] selftests: drv-net: psp: add rekey tests
Date: Wed, 18 Nov 2026 06:05:07 +0000 [thread overview]
Message-ID: <179498190761.3136.2442491896816949702@kernel.org> (raw)
In-Reply-To: <20261116-psp-v4-5-1a599df2aefa@gmail.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The patch changes the existing shared helper _recv_careful() in
tools/testing/selftests/drivers/net/psp.py, and the commit message…
--
selftests: drv-net: psp: add rekey tests
This commit adds selftests for rekeying PSP connections. The tests cover
rx-assoc and tx-assoc rejections caused by a PSP version mismatch or by
the PSP state. It also adds rx-assoc, tx-assoc and key-rotate RPC
endpoints to psp_responder.
> diff --git a/tools/testing/selftests/drivers/net/psp.py b/tools/testing/selftests/drivers/net/psp.py
> index ce0ab66666030..bd0283f9c9c02 100755
> --- a/tools/testing/selftests/drivers/net/psp.py
> +++ b/tools/testing/selftests/drivers/net/psp.py
[ ... ]
> @@ -126,7 +157,10 @@ def _recv_careful(s, target, timeout=2):
> end = time.monotonic() + timeout
> while time.monotonic() < end:
> try:
> - data += s.recv(target - len(data), socket.MSG_DONTWAIT)
> + chunk = s.recv(target - len(data), socket.MSG_DONTWAIT)
> + if not chunk:
> + raise KsftFailEx(f"peer closed after {len(data)} of {target} bytes")
> + data += chunk
> if len(data) == target:
> return data
> except BlockingIOError:
[Severity: Low]
This isn't a bug, but this hunk changes _recv_careful(), a helper that
existed before this patch. The commit message doesn't mention it.
Existing tests reach it through _req_echo(), for example
_data_basic_send(). So the change affects more than the new rekey tests:
_req_echo()
ksft_eq(_recv_careful(s, 5), b'echo\0')
Before this patch, when the peer closed the socket, recv() returned b''.
The loop then spun without sleeping until the 2 second timeout and
failed with "short read, got N of M bytes".
With this patch it fails at once with "peer closed after N of M bytes".
The only place this is described is the v3 note "fail fast in
_recv_careful() if the peer closes the connection". That note is below
the --- line, so it won't be kept in git history.
Could the commit message say that _recv_careful() now fails fast when
the peer closes the connection? Alternatively, this could go in a
separate patch.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116-psp-v4-0-1a599df2aefa%40gmail.com
prev parent reply other threads:[~2026-11-18 6:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 12:04 [PATCH net-next v4 0/5] psp: support rekeying psp protected tcp connections Daniel Zahka
2026-11-16 12:04 ` [PATCH net-next v4 1/5] psp: support rx rekey operation Daniel Zahka
2026-11-18 6:05 ` netdev-bot+sashiko
2026-11-16 12:04 ` [PATCH net-next v4 2/5] psp: support tx " Daniel Zahka
2026-11-18 6:05 ` netdev-bot+sashiko
2026-11-16 12:04 ` [PATCH net-next v4 3/5] psp: defer tx key deletions for SADB drivers Daniel Zahka
2026-11-18 6:05 ` netdev-bot+sashiko
2026-11-16 12:04 ` [PATCH net-next v4 4/5] selftests: drv-net: psp: factor out psp connection setup Daniel Zahka
2026-11-16 12:04 ` [PATCH net-next v4 5/5] selftests: drv-net: psp: add rekey tests Daniel Zahka
2026-11-18 6:05 ` netdev-bot+sashiko [this message]
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=179498190761.3136.2442491896816949702@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=willemb@google.com \
--cc=willemdebruijn.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