From: Jakub Kicinski <kuba@kernel.org>
To: rkannoth@marvell.com
Cc: Jakub Kicinski <kuba@kernel.org>,
sbhatta@marvell.com, edumazet@google.com, andrew+netdev@lunn.ch,
netdev@vger.kernel.org, sgoutham@marvell.com, sumang@marvell.com,
pabeni@redhat.com, davem@davemloft.net,
linux-kernel@vger.kernel.org
Subject: Re: [net-next,v5,08/13] octeontx2-af: npc: cn20k: Add new mailboxes for CN20K silicon
Date: Tue, 27 Jan 2026 18:29:26 -0800 [thread overview]
Message-ID: <20260128022926.4153023-1-kuba@kernel.org> (raw)
In-Reply-To: <20260126123254.1000480-9-rkannoth@marvell.com>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
octeontx2-af: npc: cn20k: Add new mailboxes for CN20K silicon
This patch adds new mailbox handlers for CN20K silicon to handle MCAM
entries with larger keyword arrays (8 instead of 7), using separate
struct cn20k_mcam_entry to maintain backward compatibility.
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc.h b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> index cb05ec69e0b3..cefc5d70f3e4 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> @@ -644,6 +644,7 @@ struct rvu_npc_mcam_rule {
> u16 chan;
> u16 chan_mask;
> u8 lxmb;
> + u8 hw_prio;
> };
[ ... ]
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> index 425d3a43c0b8..620724dad093 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
[ ... ]
> @@ -3554,6 +3555,15 @@ static int rvu_dbg_npc_mcam_show_rules(struct seq_file *s, void *unused)
>
> enabled = is_mcam_entry_enabled(rvu, mcam, blkaddr, iter->entry);
> seq_printf(s, "\tenabled: %s\n", enabled ? "yes" : "no");
> + if (is_cn20k(rvu->pdev)) {
> + seq_printf(s, "\tpriority: %u\n", iter->hw_prio);
The hw_prio field is added to struct rvu_npc_mcam_rule and read here in
debugfs, but I could not find where rule->hw_prio gets assigned in
npc_install_flow(). Looking at the diff, cn20k_wreq.hw_prio is set from
req->hw_prio, but rule->hw_prio appears to be left uninitialized.
Since rules are allocated with kzalloc(), hw_prio will be zero, causing
debugfs to always show "priority: 0" for CN20K rules regardless of the
actual hardware priority configured.
I see commit 62770f15276b "octeontx2-af: npc: cn20k: add debugfs support"
later in the series adds "rule->hw_prio = req->hw_prio;" which appears to
fix this. Should that assignment be part of this patch instead?
> + index = iter->entry & (mcam->banksize - 1);
> + bank = npc_get_bank(mcam, iter->entry);
> + off = NPC_AF_CN20K_MCAMEX_BANKX_STAT_EXT(index, bank);
> + hits = rvu_read64(rvu, blkaddr, off);
> + seq_printf(s, "\thits: %lld\n", hits);
> + continue;
> + }
[ ... ]
next prev parent reply other threads:[~2026-01-28 2:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 12:32 [PATCH net-next v5 00/13] NPC HW block support for cn20k Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 01/13] octeontx2-af: npc: cn20k: Index management Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 02/13] octeontx2-af: npc: cn20k: KPM profile changes Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 03/13] octeontx2-af: npc: cn20k: Add default profile Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 04/13] octeontx2-af: npc: cn20k: MKEX profile support Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 05/13] octeontx2-af: npc: cn20k: Allocate default MCAM indexes Ratheesh Kannoth
2026-01-28 2:29 ` [net-next,v5,05/13] " Jakub Kicinski
2026-01-28 3:29 ` Ratheesh Kannoth
2026-01-29 2:11 ` Jakub Kicinski
2026-01-26 12:32 ` [PATCH net-next v5 06/13] octeontx2-af: npc: cn20k: Use common APIs Ratheesh Kannoth
2026-01-28 2:29 ` [net-next,v5,06/13] " Jakub Kicinski
2026-01-28 3:31 ` Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 07/13] octeontx2-af: npc: cn20k: Prepare for new SoC Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 08/13] octeontx2-af: npc: cn20k: Add new mailboxes for CN20K silicon Ratheesh Kannoth
2026-01-28 2:29 ` Jakub Kicinski [this message]
2026-01-28 3:31 ` [net-next,v5,08/13] " Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 09/13] octeontx2-af: npc: cn20k: virtual index support Ratheesh Kannoth
2026-01-28 2:29 ` [net-next,v5,09/13] " Jakub Kicinski
2026-01-28 3:35 ` Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 10/13] octeontx2-af: npc: cn20k: Allocate MCAM entry for flow installation Ratheesh Kannoth
2026-01-28 2:29 ` [net-next,v5,10/13] " Jakub Kicinski
2026-01-28 3:36 ` Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 11/13] octeontx2-pf: cn20k: Add TC rules support Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 12/13] octeontx2-af: npc: cn20k: add debugfs support Ratheesh Kannoth
2026-01-26 12:32 ` [PATCH net-next v5 13/13] octeontx2-af: npc: Use common structures 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=20260128022926.4153023-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=sumang@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