Re: [PATCH v8 net-next 6/6] octeontx2-af: npc: Support for custom KPU profile from filesystem
From: Ratheesh Kannoth
Date: Mon Mar 30 2026 - 23:56:07 EST
On 2026-03-27 at 19:00:36, Simon Horman (horms@xxxxxxxxxx) 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@xxxxxxxxxxxxxxxx/"
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 !