Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Cosmin Ratiu <cratiu@nvidia.com>
Cc: Tariq Toukan <tariqt@nvidia.com>,
	Rahul Rameshbabu <rrameshbabu@nvidia.com>,
	Boris Pismenny <borisp@nvidia.com>,
	"willemdebruijn.kernel@gmail.com"
	<willemdebruijn.kernel@gmail.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"daniel.zahka@gmail.com" <daniel.zahka@gmail.com>,
	Jianbo Liu <jianbol@nvidia.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"leon@kernel.org" <leon@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Raed Salem <raeds@nvidia.com>, Chris Mi <cmi@nvidia.com>,
	Dragos Tatulea <dtatulea@nvidia.com>,
	"sdf.kernel@gmail.com" <sdf.kernel@gmail.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	Mark Bloch <mbloch@nvidia.com>,
	"sdf@fomichev.me" <sdf@fomichev.me>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"aleksandr.loktionov@intel.com" <aleksandr.loktionov@intel.com>,
	Gal Pressman <gal@nvidia.com>, Lama Kayal <lkayal@nvidia.com>,
	"jacob.e.keller@intel.com" <jacob.e.keller@intel.com>
Subject: Re: [PATCH net-next 13/15] net/mlx5e: psp: Make PSP steering config dynamic
Date: Wed, 15 Jul 2026 15:42:49 +0100	[thread overview]
Message-ID: <20260715144249.GR1364329@horms.kernel.org> (raw)
In-Reply-To: <a7f3a36f058d7ee1298c8f3f5d5c65c1aa7863b6.camel@nvidia.com>

On Tue, Jul 14, 2026 at 08:05:39PM +0000, Cosmin Ratiu wrote:
> On Tue, 2026-07-14 at 18:30 +0100, Simon Horman wrote:
> > This is an AI-generated review of your patch. The human sending this
> > email has considered the AI review valid, or at least plausible.
> > Full review at: https://sashiko.dev
> > ---
> > --- Patch [13]: [PATCH net-next 13/15] net/mlx5e: psp: Make PSP
> > steering config dynamic ---
> > commit 133d9a32cbf9c1b939ae4ca8473c41624c313951
> > Author: Cosmin Ratiu <cratiu@nvidia.com>
> > 
> > net/mlx5e: psp: Make PSP steering config dynamic
> > 
> > This commit changes PSP steering tables to only be created when PSP
> > configuration is enabled on a device, instead of at device
> > initialization
> > time. This avoids imposing steering overhead on all UDP packets when
> > PSP
> > is not being used.
> > 
> > > diff --git
> > > a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
> > > b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
> > > index b526b3898c22e..3f212e46fc2f9 100644
> > > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
> > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
> > > @@ -220,18 +220,7 @@ static inline void
> > > mlx5e_accel_tx_finish(struct mlx5e_txqsq *sq,
> > >  
> > >  static inline int mlx5e_accel_init_rx(struct mlx5e_priv *priv)
> > >  {
> > > -	int err;
> > > -
> > > -	err = mlx5_accel_psp_fs_init_rx_tables(priv);
> > > -	if (err)
> > > -		goto out;
> > > -
> > > -	err = mlx5e_ktls_init_rx(priv);
> > > -	if (err)
> > > -		mlx5_accel_psp_fs_cleanup_rx_tables(priv);
> > > -
> > > -out:
> > > -	return err;
> > > +	return mlx5e_ktls_init_rx(priv);
> > >  }
> > >  
> > >  static inline void mlx5e_accel_cleanup_rx(struct mlx5e_priv *priv)
> > > @@ -242,12 +231,6 @@ static inline void
> > > mlx5e_accel_cleanup_rx(struct mlx5e_priv *priv)
> > >  
> > >  static inline int mlx5e_accel_init_tx(struct mlx5e_priv *priv)
> > >  {
> > > -	int err;
> > > -
> > > -	err = mlx5_accel_psp_fs_init_tx_tables(priv);
> > > -	if (err)
> > > -		return err;
> > > -
> > >  	return mlx5e_ktls_init_tx(priv);
> > >  }
> > 
> > [Severity: Critical]
> > Does removing the unconditional table creation here prevent PSP
> > tables
> > from being restored on device attach or resume?
> > 
> > Since mlx5_accel_psp_fs_cleanup_tx_tables() is still called during
> > device
> > detach or suspend, the PSP steering tables are destroyed. However,
> > because
> > mlx5e_accel_init_tx() no longer recreates them, the tables appear to
> > remain
> > missing after a suspend/resume or detach/attach cycle.
> > 
> > Because software psp_assoc structures remain bound to active sockets,
> > could
> > this leave the device in a state where the hardware TX steering table
> > (which
> > contains the CRYPTO_ENCRYPT action) is missing?
> > 
> > If so, would this cause egress traffic to bypass encryption and be
> > transmitted in plaintext?
> 
> When the device is suspended, 1. all TX keys are released and 2.
> steering rules are removed. 3. psp state is completely freed, including
> the configuration intention.
> 
> When the device is resumed, psp is reinitialized to a blank state.
> 
> Before these changes, psp was also reset to a blank state (no keys, but
> with steering rules readded). This also broke existing PSP connections.
> 
> I guess fixing this behavior during suspend is outside the scope of
> this series. I don't like it, we should do something about it, but not
> in this series.

Thanks, point taken.
I think we can leave this problem for another time.

  reply	other threads:[~2026-07-15 14:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 13:08 [PATCH net-next 00/15] net/mlx5e: PSP cleanups and improvements Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 01/15] net/mlx5e: psp: Rename the saved psp_dev to 'psd' Tariq Toukan
2026-07-07 14:11   ` Loktionov, Aleksandr
2026-07-07 13:08 ` [PATCH net-next 02/15] net/mlx5e: psp: Remove PSP steering mutexes Tariq Toukan
2026-07-07 14:14   ` Loktionov, Aleksandr
2026-07-07 13:08 ` [PATCH net-next 03/15] net/mlx5e: psp: Remove unneeded ref counting for PSP steering Tariq Toukan
2026-07-07 14:15   ` Loktionov, Aleksandr
2026-07-07 13:08 ` [PATCH net-next 04/15] net/mlx5e: psp: Merge rx_err rule add/delete with ft create/delete Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 05/15] net/mlx5e: psp: Use helpers for steering object manipulation Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 06/15] net/mlx5e: psp: Factor out drop rule creation code Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 07/15] net/mlx5e: psp: Remove unused PSP syndrome copy action Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 08/15] net/mlx5e: psp: Rename and consolidate steering functions Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 09/15] net/mlx5e: psp: Adjust rx_check FT size and use a drop_group Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 10/15] net/mlx5e: psp: Add an RX steering table Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 11/15] net/mlx5e: psp: Use a single rx_check table Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 12/15] net/mlx5e: psp: Flatten steering structures Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 13/15] net/mlx5e: psp: Make PSP steering config dynamic Tariq Toukan
2026-07-14 17:30   ` Simon Horman
2026-07-14 20:05     ` Cosmin Ratiu
2026-07-15 14:42       ` Simon Horman [this message]
2026-07-07 13:08 ` [PATCH net-next 14/15] net/mlx5e: Return errors from profile->enable Tariq Toukan
2026-07-07 13:08 ` [PATCH net-next 15/15] net/mlx5e: psp: Report PSP dev registration errors Tariq Toukan
2026-07-14 17:31   ` Simon Horman
2026-07-14 20:08     ` Cosmin Ratiu
2026-07-15 14:42       ` Simon Horman
2026-07-07 18:29 ` [PATCH net-next 00/15] net/mlx5e: PSP cleanups and improvements Daniel Zahka
2026-07-08 12:37   ` Cosmin Ratiu
2026-07-09 10:51     ` Cosmin Ratiu
2026-07-09 12:37       ` Daniel Zahka

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=20260715144249.GR1364329@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=borisp@nvidia.com \
    --cc=cmi@nvidia.com \
    --cc=cratiu@nvidia.com \
    --cc=daniel.zahka@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jianbol@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lkayal@nvidia.com \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=raeds@nvidia.com \
    --cc=rrameshbabu@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=sdf.kernel@gmail.com \
    --cc=sdf@fomichev.me \
    --cc=tariqt@nvidia.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