From: Jakub Kicinski <kuba@kernel.org>
To: rkannoth@marvell.com
Cc: Jakub Kicinski <kuba@kernel.org>,
edumazet@google.com, sumang@marvell.com,
linux-kernel@vger.kernel.org, sbhatta@marvell.com,
davem@davemloft.net, netdev@vger.kernel.org, pabeni@redhat.com,
andrew+netdev@lunn.ch, sgoutham@marvell.com
Subject: Re: [net-next,v6,02/13] octeontx2-af: npc: cn20k: KPM profile changes
Date: Wed, 28 Jan 2026 21:13:03 -0800 [thread overview]
Message-ID: <20260129051303.376551-1-kuba@kernel.org> (raw)
In-Reply-To: <20260128071235.3577206-3-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: KPM profile changes
This patch adds KPM (KPU Module) profile support for CN20K silicon,
which groups 16 KPUs into 8 KPM profiles (KPM0 = KPU0 + KPU8, etc.)
for more efficient parser resource usage.
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c
> index 30cc05c64487..dfd94a30d81c 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c
[ ... ]
> +static void
> +npc_config_kpmaction(struct rvu *rvu, int blkaddr,
> + const struct npc_kpu_profile_action *kpuaction,
> + int kpm, int entry, bool pkind)
> +{
> + struct npc_kpm_action0 action0 = {0};
> + struct npc_kpu_action1 action1 = {0};
> + u64 reg;
> +
> + action1.errlev = kpuaction->errlev;
> + action1.errcode = kpuaction->errcode;
> + action1.dp0_offset = kpuaction->dp0_offset;
> + action1.dp1_offset = kpuaction->dp1_offset;
> + action1.dp2_offset = kpuaction->dp2_offset;
[ ... ]
> + action0.capture_flags = kpuaction->flags;
^^^^^^^^^^^^^^^^
The npc_kpm_action0 structure defines capture_flags as a 4-bit field,
while kpuaction->flags is u8 (8 bits). The KPU profiles use flag values
such as NPC_F_LA_U_HAS_IH_NIX (0x20), NPC_F_LA_U_HAS_HIGIG2 (0x40), and
NPC_F_LB_U_UNK_ETYPE (0x80), which all exceed what 4 bits can represent.
Is this truncation intentional for the CN20K hardware register layout?
If so, will the parser functionality work correctly when these upper
flag bits are silently discarded?
> + action0.ptr_advance = kpuaction->ptr_advance;
[ ... ]
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.h b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.h
> index 26da0a2c717a..55882a0f37fc 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.h
[ ... ]
> +struct npc_kpm_action0 {
> +#if defined(__BIG_ENDIAN_BITFIELD)
[ ... ]
> + u64 rsvd_32_35 : 4;
> + u64 capture_flags : 4;
For reference, the existing npc_kpu_action0 in npc.h has capture_flags
as 8 bits without the rsvd_32_35 field. This structural difference
appears intentional for CN20K hardware, but the same KPU profiles
containing flags > 15 are loaded via npc_load_kpu_profile() for CN20K.
> + u64 ptr_advance : 8;
[ ... ]
next prev parent reply other threads:[~2026-01-29 5:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 7:12 [PATCH net-next v6 00/13] NPC HW block support for cn20k Ratheesh Kannoth
2026-01-28 7:12 ` [PATCH net-next v6 01/13] octeontx2-af: npc: cn20k: Index management Ratheesh Kannoth
2026-01-28 11:27 ` ALOK TIWARI
2026-01-29 5:13 ` [net-next,v6,01/13] " Jakub Kicinski
2026-01-29 5:23 ` Ratheesh Kannoth
2026-01-29 23:50 ` Jakub Kicinski
2026-01-28 7:12 ` [PATCH net-next v6 02/13] octeontx2-af: npc: cn20k: KPM profile changes Ratheesh Kannoth
2026-01-29 5:13 ` Jakub Kicinski [this message]
2026-01-28 7:12 ` [PATCH net-next v6 03/13] octeontx2-af: npc: cn20k: Add default profile Ratheesh Kannoth
2026-01-28 7:12 ` [PATCH net-next v6 04/13] octeontx2-af: npc: cn20k: MKEX profile support Ratheesh Kannoth
2026-01-28 7:12 ` [PATCH net-next v6 05/13] octeontx2-af: npc: cn20k: Allocate default MCAM indexes Ratheesh Kannoth
2026-01-28 7:12 ` [PATCH net-next v6 06/13] octeontx2-af: npc: cn20k: Use common APIs Ratheesh Kannoth
2026-01-28 7:12 ` [PATCH net-next v6 07/13] octeontx2-af: npc: cn20k: Prepare for new SoC Ratheesh Kannoth
2026-01-28 7:12 ` [PATCH net-next v6 08/13] octeontx2-af: npc: cn20k: Add new mailboxes for CN20K silicon Ratheesh Kannoth
2026-01-29 5:13 ` [net-next,v6,08/13] " Jakub Kicinski
2026-01-28 7:12 ` [PATCH net-next v6 09/13] octeontx2-af: npc: cn20k: virtual index support Ratheesh Kannoth
2026-01-29 5:13 ` [net-next,v6,09/13] " Jakub Kicinski
2026-01-28 7:12 ` [PATCH net-next v6 10/13] octeontx2-af: npc: cn20k: Allocate MCAM entry for flow installation Ratheesh Kannoth
2026-01-29 5:13 ` [net-next,v6,10/13] " Jakub Kicinski
2026-01-28 7:12 ` [PATCH net-next v6 11/13] octeontx2-pf: cn20k: Add TC rules support Ratheesh Kannoth
2026-01-29 5:13 ` [net-next,v6,11/13] " Jakub Kicinski
2026-01-28 7:12 ` [PATCH net-next v6 12/13] octeontx2-af: npc: cn20k: add debugfs support Ratheesh Kannoth
2026-01-28 7:12 ` [PATCH net-next v6 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=20260129051303.376551-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