Netdev List
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<donald.hunter@gmail.com>, <edumazet@google.com>,
	<horms@kernel.org>, <jiri@resnulli.us>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <sgoutham@marvell.com>
Subject: Re: [PATCH v17 net-next 4/8] octeontx2-af: npc: cn20k: add subbank search order control
Date: Tue, 2 Jun 2026 09:36:16 +0530	[thread overview]
Message-ID: <ah5WuEABiQTsZkbd@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <20260601025844.865865-5-rkannoth@marvell.com>

On 2026-06-01 at 08:28:39, Ratheesh Kannoth (rkannoth@marvell.com) wrote:

>> +	enum {
>> +		FREE = 0,
>> +		USED = 1,
>> +	};
>> +
>> +	if (cnt != npc_priv.num_subbanks) {
>> +		dev_err(rvu->dev, "Number of entries(%u) != %u\n",
>> +			cnt, npc_priv.num_subbanks);
>> +		return -EINVAL;
>> +	}
>> +
>> +	mutex_lock(&mcam->lock);
>> +	npc_lock_all_subbank();
>This is a pre-existing issue, but does calling npc_lock_all_subbank()
>here trigger a lockdep splat?
>

Need to use nested lock or lockdep_off() to supress this. Since this is preexistig issue
will post a seperate fix patch after this series is merged.

>> +const u32 *npc_cn20k_search_order_get(bool *restricted_order, u32 *sz)
>> +{
>> +	*restricted_order = restrict_valid;
>> +	*sz = npc_priv.num_subbanks;
>> +	return subbank_srch_order;
>> +}
>This is a pre-existing issue, but does the getter return an array that
>differs from the actual hardware mapping initialized earlier?
>During driver initialization, npc_create_srch_order() creates an array
>mapping priority to subbank index. However, npc_subbank_init() accesses
>it as sb->arr_idx = subbank_srch_order[idx], treating the same array as
>mapping subbank index to priority.
>The new devlink getter returns the raw subbank_srch_order array, while
>the setter applies it correctly as sb->arr_idx = prio.
>Because the initial hardware state does not match the getter output,
>will a user-space application performing a devlink get followed by a
>set with the exact same array silently flip the hardware priorities from
>the inverted order to the intended order?
Preexisting issue, will be addressed as a patch to net tree after the series
is merged

  reply	other threads:[~2026-06-02  4:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01  2:58 [PATCH v17 net-next 0/8] octeontx2-af: npc: Enhancements Ratheesh Kannoth
2026-06-01  2:58 ` [PATCH v17 net-next 1/8] octeontx2-af: npc: cn20k: debugfs enhancements Ratheesh Kannoth
2026-06-01  2:58 ` [PATCH v17 net-next 2/8] devlink: heap-allocate param fill buffers in devlink_nl_param_fill Ratheesh Kannoth
2026-06-01  2:58 ` [PATCH v17 net-next 3/8] devlink: Implement devlink param multi attribute nested data values Ratheesh Kannoth
2026-06-02  3:44   ` Ratheesh Kannoth
2026-06-01  2:58 ` [PATCH v17 net-next 4/8] octeontx2-af: npc: cn20k: add subbank search order control Ratheesh Kannoth
2026-06-02  4:06   ` Ratheesh Kannoth [this message]
2026-06-01  2:58 ` [PATCH v17 net-next 5/8] octeontx2: cn20k: Coordinate default rules with NIX LF lifecycle Ratheesh Kannoth
2026-06-01  2:58 ` [PATCH v17 net-next 6/8] octeontx2-af: npc: Support for custom KPU profile from filesystem Ratheesh Kannoth
2026-06-02  4:13   ` Ratheesh Kannoth
2026-06-01  2:58 ` [PATCH v17 net-next 7/8] octeontx2: cn20k: Respect NPC MCAM X2/X4 profile in flows and DFT alloc Ratheesh Kannoth
2026-06-01  2:58 ` [PATCH v17 net-next 8/8] octeontx2-af: npc: cn20k: Allocate npc_priv and dstats dynamically Ratheesh Kannoth
2026-06-02  4:20   ` Ratheesh Kannoth

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=ah5WuEABiQTsZkbd@rkannoth-OptiPlex-7090 \
    --to=rkannoth@marvell.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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