From: Jakub Kicinski <kuba@kernel.org>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>, <netdev@vger.kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Sabrina Dubroca <sd@queasysnail.net>,
Bobby Eshleman <bobbyeshleman@meta.com>,
Boris Pismenny <borisp@nvidia.com>,
Carolina Jubran <cjubran@nvidia.com>,
Cosmin Ratiu <cratiu@nvidia.com>,
Daniel Zahka <daniel.zahka@gmail.com>,
Doruk Tan Ozturk <doruk@0sec.ai>,
Dragos Tatulea <dtatulea@nvidia.com>,
Gal Pressman <gal@nvidia.com>, Jianbo Liu <jianbol@nvidia.com>,
Kees Cook <kees@kernel.org>, Leon Romanovsky <leon@kernel.org>,
open list <linux-kernel@vger.kernel.org>,
<linux-kselftest@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
Mark Bloch <mbloch@nvidia.com>, Petr Machata <petrm@nvidia.com>,
Raed Salem <raeds@nvidia.com>,
Rahul Rameshbabu <rrameshbabu@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>, Shuah Khan <shuah@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemb@google.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [PATCH net-next V4 14/14] selftests: drv-net: Add PSP HW GRO conformance tests
Date: Fri, 11 Sep 2026 18:24:33 -0700 [thread overview]
Message-ID: <20260911182433.74d3f73c@kernel.org> (raw)
In-Reply-To: <20260908065244.3799142-15-tariqt@nvidia.com>
On Tue, 8 Sep 2026 09:52:44 +0300 Tariq Toukan wrote:
> From: Cosmin Ratiu <cratiu@nvidia.com>
>
> Add PSP conformance tests using the same gro helper binary as other gro
> tests , but in --psp mode. SPIs are procured by psp_gro.py from a real
> PSP device and handed off to the gro sender & receiver. The sender
> crafts and encrypts packets in software, the receiver relies fully on
> the HW to decrypt, decapsulate and do HW GRO.
>
> Because the NIC decrypts and decapsulates before the frames reach the
> receiver AF_PACKET tap, the gro receiver sees the plain frames and the
> assertions remain exactly the same as other gro tests.
>
> So these tests verify, at length, that the device does PSP HW-GRO the
> same way as plain TCP.
>
> Additional PSP-specific tests are defined to check that GRO doesn't
> merge packets across PSP versions, SPIs, encryption-status, etc.
>
> Some gro tests are not included because they don't work:
> - ip_csum: the checksum is recomputed by psp_dev_rcv().
> - tcp_csum: packets are marked with CHECKSUM_UNNECESSARY.
> - ip_frag4/ip_frag6: PSP is incompatible with IP fragmentation.
> - IPv6 extension header tests: PSP doesn't deal with IPv6 ext headers.
Daniel commented on the csum tests already, it'd also be good to
understand what the problem with frag tests is. Presumably they
get passed thru still encrypted? Or dropped and counted as errors?
> diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testing/selftests/drivers/net/hw/Makefile
> index 6105be8e590f..daa7e52f236e 100644
> --- a/tools/testing/selftests/drivers/net/hw/Makefile
> +++ b/tools/testing/selftests/drivers/net/hw/Makefile
> @@ -13,6 +13,20 @@ else
> $(warning excluding iouring tests, liburing not installed or too old)
> endif
>
> +# psp_gro.py uses the gro binary in PSP mode, which requires OpenSSL.
> +PKG_CONFIG ?= pkg-config
> +HAVE_OPENSSL := $(shell echo 'int main(void) { return 0; }' | \
> + $(CC) -x c - -include openssl/evp.h \
> + $(shell $(PKG_CONFIG) --cflags --libs libcrypto 2>/dev/null \
> + || echo -lcrypto) \
> + -o /dev/null >/dev/null 2>&1 && echo 1)
> +
> +ifeq ($(HAVE_OPENSSL),1)
> +COND_PROGS += psp_gro.py
> +else
> +$(warning excluding PSP GRO tests, libcrypto not installed)
> +endif
Looks like slop. Why do this? Just run the test and see if it works.
Don't hide the python tests because build was lacking. We explicitly
want to see all tests run and fail if something is missing in the build
setup in NIPA.
If you really want you can "probe" or display the support in some --help
message from the binary and check at runtime.
> TEST_GEN_FILES := \
> $(COND_GEN_FILES) \
> # end of TEST_GEN_FILES
> @@ -40,6 +54,7 @@ TEST_PROGS = \
> nk_qlease.py \
> ntuple.py \
> pp_alloc_fail.py \
> + $(COND_PROGS) \
> rss_api.py \
> rss_ctx.py \
> rss_drv.py \
> @@ -64,6 +79,8 @@ TEST_FILES := \
>
> TEST_INCLUDES := \
> $(wildcard lib/py/*.py ../lib/py/*.py) \
> + ../gro_lib.py \
> + ../psp_lib.py \
ugh, just move the test down to the drv-net dir, and Xfail for
netdevsim. Both PSP and GRO live in ../ better to keep this test
there as well.
> +# Tests for both IP versions, a subset of gro tests. Missing:
> +# - tcp_csum: PSP packets are validated by HW (with the ICV) and marked with
> +# CHECKSUM_UNNECESSARY.
> +_COMMON = ["data_same", "data_lrg_sml", "data_sml_lrg", "data_lrg_1byte",
> + "data_burst",
> + "ack",
> + "flags_psh", "flags_syn", "flags_rst", "flags_urg", "flags_cwr",
> + "tcp_seq", "tcp_ts", "tcp_opt",
> + "ip_ecn", "ip_tos",
> + "large_max", "large_rem",
Really not great that we have to duplicate all the cases under psp.
Narcisa is adding BIG TCP cases for instance, how are we
going to keep this in sync :S
next prev parent reply other threads:[~2026-09-12 1:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 6:52 [PATCH net-next V4 00/14] net/mlx5e: Add support for HW-GRO to PSP Tariq Toukan
2026-09-08 6:52 ` [PATCH net-next V4 01/14] net/mlx5e: Generalize TC <-> IPsec mutual exclusion Tariq Toukan
2026-09-10 21:54 ` netdev-bot+sashiko
2026-09-12 1:25 ` Jakub Kicinski
2026-09-08 6:52 ` [PATCH net-next V4 02/14] net/mlx5e: ipsec: Block TC offload when IPsec is enabled Tariq Toukan
2026-09-08 6:52 ` [PATCH net-next V4 03/14] net/mlx5e: psp: Block TC offload when PSP " Tariq Toukan
2026-09-08 6:52 ` [PATCH net-next V4 04/14] net/mlx5e: macsec: Block TC offload when MACsec " Tariq Toukan
2026-09-10 21:54 ` netdev-bot+sashiko
2026-09-08 6:52 ` [PATCH net-next V4 05/14] net/mlx5e: psp: Move RX marker from ft_metadata to flow_tag Tariq Toukan
2026-09-08 6:52 ` [PATCH net-next V4 06/14] net/mlx5e: ipsec: " Tariq Toukan
2026-09-08 6:52 ` [PATCH net-next V4 07/14] net/mlx5e: macsec: " Tariq Toukan
2026-09-08 6:52 ` [PATCH net-next V4 08/14] net/mlx5e: psp: Handle HW-decapsulated RX PSP packets Tariq Toukan
2026-09-08 6:52 ` [PATCH net-next V4 09/14] net/mlx5e: psp: Add an rx_decap steering table Tariq Toukan
2026-09-08 23:31 ` Daniel Zahka
2026-09-10 21:54 ` netdev-bot+sashiko
2026-09-08 6:52 ` [PATCH net-next V4 10/14] net/mlx5e: shampo: Flush session on PSP mismatch Tariq Toukan
2026-09-10 21:54 ` netdev-bot+sashiko
2026-09-08 6:52 ` [PATCH net-next V4 11/14] net/mlx5e: psp: Dynamically reconfigure based on SHAMPO mode Tariq Toukan
2026-09-10 21:54 ` netdev-bot+sashiko
2026-09-08 6:52 ` [PATCH net-next V4 12/14] selftests: drv-net: psp: Extract shared helpers into psp_lib.py Tariq Toukan
2026-09-08 22:34 ` Daniel Zahka
2026-09-08 6:52 ` [PATCH net-next V4 13/14] selftests: net: gro: Add PSP encapsulation and encryption Tariq Toukan
2026-09-08 22:55 ` Daniel Zahka
2026-09-10 21:54 ` netdev-bot+sashiko
2026-09-08 6:52 ` [PATCH net-next V4 14/14] selftests: drv-net: Add PSP HW GRO conformance tests Tariq Toukan
2026-09-08 23:22 ` Daniel Zahka
2026-09-10 21:54 ` netdev-bot+sashiko
2026-09-12 1:24 ` Jakub Kicinski [this message]
2026-09-11 14:50 ` [PATCH net-next V4 00/14] net/mlx5e: Add support for HW-GRO to PSP Cosmin Ratiu
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=20260911182433.74d3f73c@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bobbyeshleman@meta.com \
--cc=borisp@nvidia.com \
--cc=cjubran@nvidia.com \
--cc=cratiu@nvidia.com \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=doruk@0sec.ai \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=jianbol@nvidia.com \
--cc=kees@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=raeds@nvidia.com \
--cc=rrameshbabu@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=sd@queasysnail.net \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tariqt@nvidia.com \
--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
all inboxes | Powered by JetHome®