All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: tariqt@nvidia.com
Cc: Simon Horman <horms@kernel.org>,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com,
	aleksandr.loktionov@intel.com, borisp@nvidia.com, cmi@nvidia.com,
	cratiu@nvidia.com, daniel.zahka@gmail.com, dtatulea@nvidia.com,
	gal@nvidia.com, jacob.e.keller@intel.com, jianbol@nvidia.com,
	lkayal@nvidia.com, leon@kernel.org, linux-kernel@vger.kernel.org,
	linux-rdma@vger.kernel.org, mbloch@nvidia.com, raeds@nvidia.com,
	rrameshbabu@nvidia.com, saeedm@nvidia.com, sdf@fomichev.me,
	sdf.kernel@gmail.com, willemdebruijn.kernel@gmail.com
Subject: Re: [PATCH net-next 15/15] net/mlx5e: psp: Report PSP dev registration errors
Date: Tue, 14 Jul 2026 18:31:52 +0100	[thread overview]
Message-ID: <20260714173151.1863310-2-horms@kernel.org> (raw)
In-Reply-To: <20260707130858.969928-16-tariqt@nvidia.com>

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 [15]: [PATCH net-next 15/15] net/mlx5e: psp: Report PSP dev registration errors ---
commit 76afe7de4d1e708e7c01d267ef1fb9cf946de937
Author: Cosmin Ratiu <cratiu@nvidia.com>

net/mlx5e: psp: Report PSP dev registration errors

This commit updates mlx5e_psp_register() to return an error code instead
of void when psp_dev_create() fails. The caller, mlx5e_nic_enable(), is
also updated to check this return value and abort if PSP registration fails.

> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -6199,7 +6199,9 @@ static int mlx5e_nic_enable(struct mlx5e_priv *priv)
>  
>  	mlx5e_fs_init_l2_addr(priv->fs, netdev);
>  	mlx5e_ipsec_init(priv);
> -	mlx5e_psp_register(priv);
> +	err = mlx5e_psp_register(priv);
> +	if (err)
> +		goto out_ipsec_cleanup;

[Severity: High]
Could propagating this error cause the entire network interface to fail if
the optional PSP offload fails to register?

If psp_dev_create() fails (e.g., due to memory pressure or ID exhaustion
in xa_alloc_cyclic), mlx5e_nic_enable() will now abort, resulting in a
complete loss of networking capability for the device.

Notice how the code immediately following this handles MACsec initialization
failures by logging the error and allowing the NIC to continue operating:

	err = mlx5e_macsec_init(priv);
	if (err)
		mlx5_core_err(mdev, "MACsec initialization failed, %d\n", err);

Should PSP registration failure fall back gracefully and allow the core NIC
to function without the offload, similar to how MACsec is handled?

>  
>  	err = mlx5e_macsec_init(priv);
>  	if (err)
>  		mlx5_core_err(mdev, "MACsec initialization failed, %d\n", err);

  reply	other threads:[~2026-07-14 17:32 UTC|newest]

Thread overview: 27+ 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-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 [this message]
2026-07-14 20:08     ` Cosmin Ratiu
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=20260714173151.1863310-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.