public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Cosmin Ratiu <cratiu@nvidia.com>
To: "kuba@kernel.org" <kuba@kernel.org>
Cc: 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>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"leon@kernel.org" <leon@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Rahul Rameshbabu <rrameshbabu@nvidia.com>,
	Raed Salem <raeds@nvidia.com>,
	Dragos Tatulea <dtatulea@nvidia.com>,
	"kees@kernel.org" <kees@kernel.org>,
	Mark Bloch <mbloch@nvidia.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	Tariq Toukan <tariqt@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Gal Pressman <gal@nvidia.com>
Subject: Re: [PATCH net 1/2] net/mlx5e: psp: Fix invalid access on PSP dev registration fail
Date: Wed, 22 Apr 2026 09:25:11 +0000	[thread overview]
Message-ID: <e9d10b11f73c0ff212a5dee0b08d9ca90eca5407.camel@nvidia.com> (raw)
In-Reply-To: <20260421113210.4f6a8eb6@kernel.org>

On Tue, 2026-04-21 at 11:32 -0700, Jakub Kicinski wrote:
> On Tue, 21 Apr 2026 17:34:32 +0000 Cosmin Ratiu wrote:
> > > No, the normal thing to do is to propagate errors.
> > > If you want to diverge from that _you_ should have a reason,
> > > a better reason than a vague "kernel can fail".
> > > I'd prefer for the driver to fail in an obvious way.
> > > Which will be immediately spotted by the operator, not 2 weeks
> > > later when 10% of the fleet is upgraded already.
> > > The only exception I'd make is to keep devlink registered in
> > > case the fix is to flash a different FW.  
> > 
> > In this case, PSP not working would be spotted on the next PSP dev-
> > get
> > op which produces zilch instead of working devices.
> 
> When you have X vendors times Y device generations times Z FW
> versions
> in your fleet dev-get returning nothing is not a failure. It just
> means
> you're running on a machine that's not capable. Best you can do to
> spot a buggy kernel is to notice that the fraction of PSP traffic is
> decreasing over time. After significant portion of the fleet is
> already
> on the bad kernel.
> 
> > But I understand what you want. You'd like the netdevice to either
> > be
> > fully initialized with all supported+configured protocols or fail
> > the
> > open operation. No intermediate/partial states. This is a non-
> > trivial
> > refactor for mlx5, because mlx5_nic_enable() returns nothing.
> > Refactoring seems possible though, its only caller is
> > mlx5e_attach_netdev(), which returns errors. It's certainly not
> > something that should be done for a net fix though.
> > 
> > I have a series pending for net-next where the PSP configuration is
> > hooked to mlx5e_psp_set_config(). I will look into implementing
> > what
> > you propose there and propagate errors.
> > 
> > Meanwhile, do you want to take these fixes (1 and 2) or maybe just
> > 2
> > for net or not?
> 
> Can you call mlx5e_psp_cleanup() when register fails for now?

Done for the next version, currently undergoing testing.

Cosmin.


  reply	other threads:[~2026-04-22  9:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17  5:01 [PATCH net 0/2] mlx5e PSP fixes Tariq Toukan
2026-04-17  5:02 ` [PATCH net 1/2] net/mlx5e: psp: Fix invalid access on PSP dev registration fail Tariq Toukan
2026-04-18 19:08   ` Jakub Kicinski
2026-04-20 10:30     ` Cosmin Ratiu
2026-04-20 17:09       ` Jakub Kicinski
2026-04-21 12:29         ` Cosmin Ratiu
2026-04-21 14:26           ` Jakub Kicinski
2026-04-21 14:33             ` Cosmin Ratiu
2026-04-21 15:09               ` Jakub Kicinski
2026-04-21 17:34                 ` Cosmin Ratiu
2026-04-21 18:32                   ` Jakub Kicinski
2026-04-22  9:25                     ` Cosmin Ratiu [this message]
2026-04-22 15:13                       ` Cosmin Ratiu
2026-04-17  5:02 ` [PATCH net 2/2] net/mlx5e: psp: Hook PSP dev reg/unreg to profile enable/disable Tariq Toukan

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=e9d10b11f73c0ff212a5dee0b08d9ca90eca5407.camel@nvidia.com \
    --to=cratiu@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=borisp@nvidia.com \
    --cc=daniel.zahka@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --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=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