Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: nshettyj@marvell.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hariprasad Kelam <hkelam@marvell.com>,
	Sunil Goutham <sgoutham@marvell.com>,
	Ratheesh Kannoth <rkannoth@marvell.com>,
	Geetha sowjanya <gakula@marvell.com>,
	Subbaraya Sundeep <sbhatta@marvell.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v2] octeontx2-af: Use LMAC_AF_ERR codes in CGX handlers
Date: Mon, 27 Jul 2026 18:25:07 +0100	[thread overview]
Message-ID: <20260727172507.GR418547@horms.kernel.org> (raw)
In-Reply-To: <20260722040307.3393236-1-nshettyj@marvell.com>

On Wed, Jul 22, 2026 at 09:33:07AM +0530, nshettyj@marvell.com wrote:
> From: Hariprasad Kelam <hkelam@marvell.com>
> 
> When a netdev that is not mapped to a MAC block (cgx/rpm) requests a
> MAC feature, the AF driver currently returns generic errors like -EPERM.
> 
> Replace these generic error codes with driver-specific LMAC_AF_ERR_*
> error codes to provide better debugging information.
> 
> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> Signed-off-by: Nitin Shetty J <nshettyj@marvell.com>

...

> @@ -1178,7 +1176,7 @@ int rvu_mbox_handler_cgx_set_fec_param(struct rvu *rvu,
>  	u8 cgx_id, lmac_id;
>  
>  	if (!is_pf_cgxmapped(rvu, pf))
> -		return -EPERM;
> +		return LMAC_AF_ERR_PF_NOT_MAPPED;

Hi,

The AI-generated review of this patch [1] flags a number of pre-existing
issues. Which I think they can be considered in the context of possible
follow-up.

But it also flags that the change on the line above (and other similar
changes in this patch) will result in custom error values being propagated
to user-space. Which seems undesirable.

I think one possible solution is to convert the custom error codes
to standard ones before they are propagated to user-space.
But I'm unsure of the overall effect of that on this patch.


https://sashiko.dev/#/patchset/20260722040307.3393236-1-nshettyj%40marvell.com

  

>  
>  	if (req->fec == OTX2_FEC_OFF)
>  		req->fec = OTX2_FEC_NONE;

...

      reply	other threads:[~2026-07-27 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  4:03 [PATCH net-next v2] octeontx2-af: Use LMAC_AF_ERR codes in CGX handlers nshettyj
2026-07-27 17:25 ` Simon Horman [this message]

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=20260727172507.GR418547@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nshettyj@marvell.com \
    --cc=pabeni@redhat.com \
    --cc=rkannoth@marvell.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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