mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cosmin Ratiu <cratiu@nvidia.com>
To: "andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Tariq Toukan <tariqt@nvidia.com>,
	"sd@queasysnail.net" <sd@queasysnail.net>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"daniel.zahka@gmail.com" <daniel.zahka@gmail.com>,
	"kuba@kernel.org" <kuba@kernel.org>
Cc: Petr Machata <petrm@nvidia.com>, "doruk@0sec.ai" <doruk@0sec.ai>,
	Boris Pismenny <borisp@nvidia.com>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"willemdebruijn.kernel@gmail.com"
	<willemdebruijn.kernel@gmail.com>,
	"leon@kernel.org" <leon@kernel.org>,
	Jianbo Liu <jianbol@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rahul Rameshbabu <rrameshbabu@nvidia.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"bobbyeshleman@meta.com" <bobbyeshleman@meta.com>,
	Raed Salem <raeds@nvidia.com>,
	"skhan@linuxfoundation.org" <skhan@linuxfoundation.org>,
	Carolina Jubran <cjubran@nvidia.com>,
	"kees@kernel.org" <kees@kernel.org>,
	"horms@kernel.org" <horms@kernel.org>,
	Dragos Tatulea <dtatulea@nvidia.com>,
	Mark Bloch <mbloch@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"willemb@google.com" <willemb@google.com>,
	Gal Pressman <gal@nvidia.com>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH net-next V4 14/14] selftests: drv-net: Add PSP HW GRO conformance tests
Date: Thu, 17 Sep 2026 14:58:52 +0000	[thread overview]
Message-ID: <ec10b8dfb77efae7bb299940294b329b06656edf.camel@nvidia.com> (raw)
In-Reply-To: <DLABL6GQC9HK.2P8KU1JJRO1XV@gmail.com>

On Tue, 2026-09-08 at 19:22 -0400, Daniel Zahka wrote:
> On Tue Sep 8, 2026 at 2:52 AM EDT, 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().
> 
> psp_dev_rcv() isn't on the hw gro path for mlx5, right?

You're right, that's a bogus argument, sorry.
The truth was that the encap support in gro.c was recomputing the IP
checksum, sabotaging the bad csum test... Will be fixed in the next
version.


> > - tcp_csum: packets are marked with CHECKSUM_UNNECESSARY.
> 
> this also seems strange to me as the hw gro engine and its decision
> to
> coalesce two packets sits upstream of this skb->ip_summed
> determination
> in the driver, right?

Another weak argument from my side, sorry. I will add the test back.

> 
> > - ip_frag4/ip_frag6: PSP is incompatible with IP fragmentation.
> > - IPv6 extension header tests: PSP doesn't deal with IPv6 ext
> > headers.
> > 
> > Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
> > Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
> > Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> > ---
> ...
> > +
> > +@ksft_variants(_ip_variants())
> > +def test_psp_ver_diff(cfg, protocol):
> > +    """Frames from two different PSP versions must not
> > coalesce."""
> > +    init_psp_dev(cfg)
> > +    if len(cfg.psp_info['psp-versions-cap']) < 2:
> 
> nit: what the above checks is slightly different than what the _run()
> below uses, e.g. dev supports versions 0 and 2.

Will drop this check.

> 
> > +        raise KsftSkipEx("Device supports a single PSP version")
> > +
> > +    _run(cfg, "psp_ver_diff", protocol, [0, 1])
> > +
> 
> couple of minor comments:
> 
> Reviewed-by: Daniel Zahka <daniel.zahka@gmail.com>

Thank you for the review!

Cosmin.

  reply	other threads:[~2026-09-17 14:59 UTC|newest]

Thread overview: 31+ 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-17 14:58     ` Cosmin Ratiu [this message]
2026-09-10 21:54   ` netdev-bot+sashiko
2026-09-12  1:24   ` Jakub Kicinski
2026-09-17 14:54     ` Cosmin Ratiu
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=ec10b8dfb77efae7bb299940294b329b06656edf.camel@nvidia.com \
    --to=cratiu@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bobbyeshleman@meta.com \
    --cc=borisp@nvidia.com \
    --cc=cjubran@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=kuba@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®