All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Ratheesh Kannoth <rkannoth@marvell.com>
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: Fri, 27 Mar 2026 13:30:36 +0000	[thread overview]
Message-ID: <20260327133036.GE567789@horms.kernel.org> (raw)
In-Reply-To: <20260325072159.1126964-7-rkannoth@marvell.com>

On Wed, Mar 25, 2026 at 12:51:59PM +0530, Ratheesh Kannoth wrote:

...

Thanks for the updates, much appreciated.

I have a few more minor questions.

> +void npc_load_kpu_profile(struct rvu *rvu)
> +{
> +	struct npc_kpu_profile_adapter *profile = &rvu->kpu;
> +	const char *kpu_profile = rvu->kpu_pfl_name;
> +
> +	profile->from_fs = false;
> +
> +	/* If user not specified profile customization */
> +	if (!strncmp(kpu_profile, def_pfl_name, KPU_NAME_LEN))  {
> +		npc_prepare_default_kpu(rvu, profile);
> +		return;
> +	}
> +
> +	/* Order of preceedence for load loading NPC profile (high to low)
> +	 * Firmware binary in filesystem.
> +	 * Firmware database method.
> +	 * Default KPU profile.
> +	 */
> +
> +	/* No support for filesystem KPU loading for cn20k */
> +npc_prepare_default_kpu	if (!is_cn20k(rvu->pdev)) {
> +		if (!npc_load_kpu_profile_from_fs(rvu))

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()?

> +			return;
> +	}
> +
> +	/* First prepare default KPU, then we'll customize top entries. */
> +	npc_prepare_default_kpu(rvu, profile);
> +	if (!npc_load_kpu_profile_from_fw(rvu))
> +		return;
>  
> -revert_to_default:
>  	npc_prepare_default_kpu(rvu, profile);

Is this call to npc_prepare_default_kpu() still needed?

>  }
>  
>  static void npc_parser_profile_init(struct rvu *rvu, int blkaddr)
>  {
> +	struct npc_kpu_profile_adapter *profile = &rvu->kpu;
>  	struct rvu_hwinfo *hw = rvu->hw;
>  	int num_pkinds, num_kpus, idx;
>  

...

  reply	other threads:[~2026-03-27 13:30 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 [this message]
2026-03-30  4:59     ` Ratheesh Kannoth
2026-03-31  3:43     ` Ratheesh Kannoth
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=20260327133036.GE567789@horms.kernel.org \
    --to=horms@kernel.org \
    --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=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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.