From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org, petrm@nvidia.com,
willemb@google.com, shuah@kernel.org, daniel.zahka@gmail.com,
linux-kselftest@vger.kernel.org,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next v3 0/8] psp: add a kselftest suite and netdevsim implementation
Date: Sun, 28 Sep 2025 12:00:15 -0400 [thread overview]
Message-ID: <willemdebruijn.kernel.2e2661b9a8ae9@gmail.com> (raw)
In-Reply-To: <20250927225420.1443468-1-kuba@kernel.org>
Jakub Kicinski wrote:
> Add a basic test suite for drivers that support PSP. Also, add a PSP
> implementation in the netdevsim driver.
>
> The netdevsim implementation does encapsulation and decapsulation of
> PSP packets, but no crypto.
>
> The tests cover the basic usage of the uapi, and demonstrate key
> exchange and connection setup. The tests and netdevsim support IPv4
> and IPv6. Here is an example run on a system with a CX7 NIC.
>
> TAP version 13
> 1..28
> ok 1 psp.data_basic_send_v0_ip4
> ok 2 psp.data_basic_send_v0_ip6
> ok 3 psp.data_basic_send_v1_ip4
> ok 4 psp.data_basic_send_v1_ip6
> ok 5 psp.data_basic_send_v2_ip4 # SKIP ('PSP version not supported', 'hdr0-aes-gmac-128')
> ok 6 psp.data_basic_send_v2_ip6 # SKIP ('PSP version not supported', 'hdr0-aes-gmac-128')
> ok 7 psp.data_basic_send_v3_ip4 # SKIP ('PSP version not supported', 'hdr0-aes-gmac-256')
> ok 8 psp.data_basic_send_v3_ip6 # SKIP ('PSP version not supported', 'hdr0-aes-gmac-256')
> ok 9 psp.data_mss_adjust_ip4
> ok 10 psp.data_mss_adjust_ip6
> ok 11 psp.dev_list_devices
> ok 12 psp.dev_get_device
> ok 13 psp.dev_get_device_bad
> ok 14 psp.dev_rotate
> ok 15 psp.dev_rotate_spi
> ok 16 psp.assoc_basic
> ok 17 psp.assoc_bad_dev
> ok 18 psp.assoc_sk_only_conn
> ok 19 psp.assoc_sk_only_mismatch
> ok 20 psp.assoc_sk_only_mismatch_tx
> ok 21 psp.assoc_sk_only_unconn
> ok 22 psp.assoc_version_mismatch
> ok 23 psp.assoc_twice
> ok 24 psp.data_send_bad_key
> ok 25 psp.data_send_disconnect
> ok 26 psp.data_stale_key
> ok 27 psp.removal_device_rx # XFAIL Test only works on netdevsim
> ok 28 psp.removal_device_bi # XFAIL Test only works on netdevsim
> # Totals: pass:22 fail:0 xfail:2 xpass:0 skip:4 error:0
> #
> # Responder logs (0):
> # STDERR:
> # Set PSP enable on device 1 to 0x3
> # Set PSP enable on device 1 to 0x0
>
> v3:
> - fix netdevsim bugs
> - rework the skipping
> - use errno
> - remove duplicated condition
> v2: https://lore.kernel.org/20250925211647.3450332-1-daniel.zahka@gmail.com
> - fix pylint warnings
> - insert CONFIG_INET_PSP in alphebetical order
> - use branch to skip all tests
> - fix compilation error when CONFIG_INET_PSP is not set
> v1: https://lore.kernel.org/20250924194959.2845473-1-daniel.zahka@gmail.com
>
> Jakub Kicinski (8):
> netdevsim: a basic test PSP implementation
> selftests: drv-net: base device access API test
> selftests: drv-net: add PSP responder
> selftests: drv-net: psp: add basic data transfer and key rotation
> tests
> selftests: drv-net: psp: add association tests
> selftests: drv-net: psp: add connection breaking tests
> selftests: drv-net: psp: add test for auto-adjusting TCP MSS
> selftests: drv-net: psp: add tests for destroying devices
>
> drivers/net/netdevsim/Makefile | 4 +
> tools/testing/selftests/drivers/net/Makefile | 10 +
> drivers/net/netdevsim/netdevsim.h | 27 +
> drivers/net/netdevsim/netdev.c | 43 +-
> drivers/net/netdevsim/psp.c | 225 +++++++
> net/core/skbuff.c | 1 +
> .../selftests/drivers/net/psp_responder.c | 483 ++++++++++++++
> .../testing/selftests/drivers/net/.gitignore | 1 +
> tools/testing/selftests/drivers/net/config | 1 +
> .../drivers/net/hw/lib/py/__init__.py | 4 +-
> .../selftests/drivers/net/lib/py/__init__.py | 4 +-
> .../selftests/drivers/net/lib/py/env.py | 4 +
> tools/testing/selftests/drivers/net/psp.py | 627 ++++++++++++++++++
> .../testing/selftests/net/lib/py/__init__.py | 2 +-
> tools/testing/selftests/net/lib/py/ksft.py | 10 +
> tools/testing/selftests/net/lib/py/ynl.py | 5 +
> 16 files changed, 1440 insertions(+), 11 deletions(-)
> create mode 100644 drivers/net/netdevsim/psp.c
> create mode 100644 tools/testing/selftests/drivers/net/psp_responder.c
> create mode 100755 tools/testing/selftests/drivers/net/psp.py
Reviewed-by: Willem de Bruijn <willemb@google.com>
Great both for coverage and as an example device implementation,
thanks.
I'll leave a few minor comments inline, but nothing that really needs
a respin and/or cannot be a minor fixup later.
next prev parent reply other threads:[~2025-09-28 16:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-27 22:54 [PATCH net-next v3 0/8] psp: add a kselftest suite and netdevsim implementation Jakub Kicinski
2025-09-27 22:54 ` [PATCH net-next v3 1/8] netdevsim: a basic test PSP implementation Jakub Kicinski
2025-09-28 16:02 ` Willem de Bruijn
2025-09-27 22:54 ` [PATCH net-next v3 2/8] selftests: drv-net: base device access API test Jakub Kicinski
2025-09-30 13:16 ` Paolo Abeni
2025-09-30 13:32 ` Jakub Kicinski
2025-09-27 22:54 ` [PATCH net-next v3 3/8] selftests: drv-net: add PSP responder Jakub Kicinski
2025-09-28 16:05 ` Willem de Bruijn
2025-09-27 22:54 ` [PATCH net-next v3 4/8] selftests: drv-net: psp: add basic data transfer and key rotation tests Jakub Kicinski
2025-09-27 22:54 ` [PATCH net-next v3 5/8] selftests: drv-net: psp: add association tests Jakub Kicinski
2025-09-27 22:54 ` [PATCH net-next v3 6/8] selftests: drv-net: psp: add connection breaking tests Jakub Kicinski
2025-09-27 22:54 ` [PATCH net-next v3 7/8] selftests: drv-net: psp: add test for auto-adjusting TCP MSS Jakub Kicinski
2025-09-27 22:54 ` [PATCH net-next v3 8/8] selftests: drv-net: psp: add tests for destroying devices Jakub Kicinski
2025-09-28 16:00 ` Willem de Bruijn [this message]
2025-09-29 19:04 ` [PATCH net-next v3 0/8] psp: add a kselftest suite and netdevsim implementation Jakub Kicinski
2025-09-29 19:58 ` Willem de Bruijn
2025-09-30 13:30 ` patchwork-bot+netdevbpf
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=willemdebruijn.kernel.2e2661b9a8ae9@gmail.com \
--to=willemdebruijn.kernel@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=willemb@google.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;
as well as URLs for NNTP newsgroup(s).