public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: Simon Horman <horms@kernel.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<sgoutham@marvell.com>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<donald.hunter@gmail.com>, <jiri@resnulli.us>,
	<chuck.lever@oracle.com>, <matttbe@kernel.org>,
	<cjubran@nvidia.com>, <shshitrit@nvidia.com>,
	<dtatulea@nvidia.com>, <tariqt@nvidia.com>
Subject: Re: [PATCH v8 net-next 6/6] octeontx2-af: npc: Support for custom KPU profile from filesystem
Date: Tue, 31 Mar 2026 09:13:06 +0530	[thread overview]
Message-ID: <actCysjPKrnzExJx@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <20260327133036.GE567789@horms.kernel.org>

On 2026-03-27 at 19:00:36, Simon Horman (horms@kernel.org) wrote:
> AI review flags that:
>
> npc_load_kpu_profile_from_fs() calls npc_apply_custom_kpu(),
> which returns early if the following condition is met.
>
> 	if (fw->kpus > profile->kpus)
>
> Does npc_prepare_default_kpu() need to be called before
> npc_load_kpu_profile_from_fs() to initialise profile->kpus,
> which is 0 by default due to profile being allocated using devm_kzalloc()?
simon,

Thank you very much for your time.

The v9 AI review has raised the following concern again:
https://netdev-ai.bots.linux.dev/ai-review.html?id=f29b81fe-bb3f-4902-85de-8271effbb41c

"In the filesystem loading path, does profile->kpus need to be initialized
before calling npc_load_kpu_profile_from_fs()?

Simon Horman raised this concern in v8 review on lore:
https://lore.kernel.org/netdev/20260327133036.GE567789@horms.kernel.org/"

would like to clarify that npc_prepare_default_kpu(rvu, profile) is invoked
very early in the flow, and therefore applies to all execution paths
(default, filesystem loading, and firmware loading). Additionally,
if the filesystem loading fails, npc_prepare_default_kpu() is invoked again to
ensure that all values are reset to their defaults before attempting to load from firmware.

Could you please advise on the best way to address the AI review comment?
Specifically, would you recommend:

1. Adding a clarifying comment in the code, or
2. Invoking npc_prepare_default_kpu() again just before npc_load_kpu_profile_from_fs()

to make this behavior clearer?

Thank you once again !

  parent reply	other threads:[~2026-03-31  3:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25  7:21 [PATCH v8 net-next 0/6] octeontx2-af: npc: Enhancements Ratheesh Kannoth
2026-03-25  7:21 ` [PATCH v8 net-next 1/6] octeontx2-af: npc: cn20k: debugfs enhancements Ratheesh Kannoth
2026-03-25  7:21 ` [PATCH v8 net-next 2/6] net/mlx5e: heap-allocate devlink param values Ratheesh Kannoth
2026-03-25  7:21 ` [PATCH v8 net-next 3/6] devlink: Implement devlink param multi attribute nested data values Ratheesh Kannoth
2026-03-25  7:21 ` [PATCH v8 net-next 4/6] octeontx2-af: npc: cn20k: add subbank search order control Ratheesh Kannoth
2026-03-25  7:21 ` [PATCH v8 net-next 5/6] octeontx2-af: npc: cn20k: dynamically allocate and free default MCAM entries Ratheesh Kannoth
2026-03-27 13:34   ` Simon Horman
2026-03-25  7:21 ` [PATCH v8 net-next 6/6] octeontx2-af: npc: Support for custom KPU profile from filesystem Ratheesh Kannoth
2026-03-27 13:30   ` Simon Horman
2026-03-30  4:59     ` Ratheesh Kannoth
2026-03-31  3:43     ` Ratheesh Kannoth [this message]
2026-04-02  8:45       ` Paolo Abeni

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=actCysjPKrnzExJx@rkannoth-OptiPlex-7090 \
    --to=rkannoth@marvell.com \
    --cc=chuck.lever@oracle.com \
    --cc=cjubran@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matttbe@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.com \
    --cc=shshitrit@nvidia.com \
    --cc=tariqt@nvidia.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