From: Paolo Abeni <pabeni@redhat.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>, 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, 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: Thu, 2 Apr 2026 10:45:09 +0200 [thread overview]
Message-ID: <5985db57-e992-4786-9f9a-cb863220a0ea@redhat.com> (raw)
In-Reply-To: <actCysjPKrnzExJx@rkannoth-OptiPlex-7090>
On 3/31/26 5:43 AM, Ratheesh Kannoth wrote:
> 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?
In this case, replying in the relevant thread is enough - AFAICS the AI
is allucinating quite a bit with this comment.
Sometimes adding an explanatory comment nearby the relevant code would
be better/more clear, but I think not in this specific case.
Thanks,
Paolo
prev parent reply other threads:[~2026-04-02 8:45 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
2026-04-02 8:45 ` Paolo Abeni [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=5985db57-e992-4786-9f9a-cb863220a0ea@redhat.com \
--to=pabeni@redhat.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=rkannoth@marvell.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