From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <sgoutham@marvell.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<andrew+netdev@lunn.ch>,
"Ratheesh Kannoth" <rkannoth@marvell.com>
Subject: [PATCH net-next v4 00/13] NPC HW block support for cn20k
Date: Tue, 13 Jan 2026 15:46:45 +0530 [thread overview]
Message-ID: <20260113101658.4144610-1-rkannoth@marvell.com> (raw)
This patchset adds comprehensive support for the CN20K NPC
architecture. CN20K introduces significant changes in MCAM layout,
parser design, KPM/KPU mapping, index management, virtual index handling,
and dynamic rule installation. The patches update the AF, PF/VF, and
common layers to correctly support these new capabilities while
preserving compatibility with previous silicon variants.
MCAM on CN20K differs from older designs: the hardware now contains
two vertical banks of depth 8192, and thirty-two horizontal subbanks of
depth 256. Each subbank can be configured as x2 or x4, enabling
256-bit or 512-bit key storage. Several allocation models are added to
support this layout, including contiguous and non-contiguous allocation
with or without reference ranges and priorities.
Parser and extraction logic are also enhanced. CN20K introduces a new
profile model where up to twenty-four extractors may be configured for
each parsing profile. A new KPM profile scheme is added, grouping
sixteen KPUs into eight KPM profiles, each formed by two KPUs.
Support is added for default index allocation for CN20K-specific
MCAM entry structures, virtual index allocation, improved defragmentation,
and TC rule installation by allowing the AF driver to determine
required x2/x4 rule width during flow install.
Ratheesh Kannoth (7):
octeontx2-af: npc: cn20k: Index management
Add CN20K MCAM allocation support. Implements contiguous and
non-contiguous allocation models with ref, limit, contig,
priority, and count support.
octeontx2-af: npc: cn20k: Allocate default MCAM indexes
Allocate default MCAM entries dynamically in descending index
order during NIX LF attach, reducing MCAM wastage
octeontx2-af: npc: cn20k: Prepare for new SoC
Introduce MCAM metadata structure so low-level functions no
longer receive SoC-specific structures directly.
octeontx2-af: npc: cn20k: virtual index support
Add virtual MCAM index allocation and improve CN20K MCAM
defragmentation handling. Track virtual indexes and restore
statistics correctly.
octeontx2-af: npc: cn20k: Allocate MCAM entry for flow installation
Extend install_flow mailbox so AF can determine rule width and
complete allocation and installation in a single exchange.
octeontx2-af: npc: cn20k: add debugfs support
Debugfs entries to show mcam layout and default mcam entry allocations
Legacy debugfs entries are modified to show hardware priority on cn20k
SoC.
octeontx-af: npc: Use common structures
Low level functions should use maximum mcam size array and modify cam0
and cam1. This is a cleanup patch.
Subbaraya Sundeep (1):
octeontx2-pf: cn20k: Add TC rules support
Add full TC dynamic rule support for CN20K. Handle x2/x4 rule
widths, dynamic allocation, and shifting restrictions when
mixed rule sizes exist.
Suman Ghosh (5):
octeontx2-af: npc: cn20k: KPM profile changes
Add support for CN20K KPM profiles. Sixteen KPUs are grouped
into eight KPM configurations to improve resource usage
octeontx2-af: npc: cn20k: Add default profile
Update mkex profile for CN20K and mark unused objects with
may_be_unused to silence compiler warnings.
ocetontx2-af: npc: cn20k: MKEX profile support
Add support for the new CN20K parser profile. Introduces the
extractor-based model with up to twenty-four extractors per
profile.
octeontx2-af: npc: cn20k: Use common APIs
Update common MCAM APIs for CN20K. Add new register handling,
new access algorithms, and CN20K-specific index management.
octeontx2-af: npc: cn20k: Add new mailboxes for CN20K silicon
Add CN20K-specific MCAM mailbox messages for updated mcam_entry
layout and avoid breaking backward compatibility.
MAINTAINERS | 2 +-
.../ethernet/marvell/octeontx2/af/Makefile | 2 +-
.../marvell/octeontx2/af/cn20k/debugfs.c | 437 ++
.../marvell/octeontx2/af/cn20k/debugfs.h | 3 +
.../ethernet/marvell/octeontx2/af/cn20k/npc.c | 4368 +++++++++++++++++
.../ethernet/marvell/octeontx2/af/cn20k/npc.h | 262 +
.../ethernet/marvell/octeontx2/af/cn20k/reg.h | 58 +
.../ethernet/marvell/octeontx2/af/common.h | 4 -
.../net/ethernet/marvell/octeontx2/af/mbox.h | 173 +-
.../net/ethernet/marvell/octeontx2/af/npc.h | 2 +
.../marvell/octeontx2/af/npc_profile.h | 84 +-
.../net/ethernet/marvell/octeontx2/af/rvu.c | 17 +-
.../net/ethernet/marvell/octeontx2/af/rvu.h | 18 +-
.../marvell/octeontx2/af/rvu_debugfs.c | 68 +-
.../marvell/octeontx2/af/rvu_devlink.c | 81 +-
.../ethernet/marvell/octeontx2/af/rvu_nix.c | 1 -
.../ethernet/marvell/octeontx2/af/rvu_npc.c | 513 +-
.../ethernet/marvell/octeontx2/af/rvu_npc.h | 21 +
.../marvell/octeontx2/af/rvu_npc_fs.c | 664 ++-
.../marvell/octeontx2/af/rvu_npc_fs.h | 14 +-
.../marvell/octeontx2/af/rvu_npc_hash.c | 21 +-
.../marvell/octeontx2/af/rvu_npc_hash.h | 2 +-
.../ethernet/marvell/octeontx2/nic/cn20k.c | 265 +
.../ethernet/marvell/octeontx2/nic/cn20k.h | 13 +
.../marvell/octeontx2/nic/otx2_common.h | 35 +
.../marvell/octeontx2/nic/otx2_flows.c | 263 +-
.../ethernet/marvell/octeontx2/nic/otx2_tc.c | 77 +-
27 files changed, 7086 insertions(+), 382 deletions(-)
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.h
--
ChangeLog:
v3 -> v4: Address comments from Jakub
https://lore.kernel.org/netdev/20260109054828.1822307-12-rkannoth@marvell.com/T/#t
v2 -> v3: Resolved build errors, addressed comments
v1 -> v2: Addressed comments
2.43.0
next reply other threads:[~2026-01-13 10:17 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 10:16 Ratheesh Kannoth [this message]
2026-01-13 10:16 ` [PATCH net-next v4 01/13] octeontx2-af: npc: cn20k: Index management Ratheesh Kannoth
2026-01-18 0:39 ` Jakub Kicinski
2026-01-19 4:04 ` Ratheesh Kannoth
2026-01-18 0:40 ` [net-next,v4,01/13] " Jakub Kicinski
2026-01-19 4:00 ` Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 02/13] octeontx2-af: npc: cn20k: KPM profile changes Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 03/13] octeontx2-af: npc: cn20k: Add default profile Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 04/13] ocetontx2-af: npc: cn20k: MKEX profile support Ratheesh Kannoth
2026-01-18 0:40 ` [net-next,v4,04/13] " Jakub Kicinski
2026-01-19 4:17 ` Ratheesh Kannoth
2026-01-20 3:24 ` Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 05/13] octeontx2-af: npc: cn20k: Allocate default MCAM indexes Ratheesh Kannoth
2026-01-18 0:40 ` [net-next,v4,05/13] " Jakub Kicinski
2026-01-19 3:42 ` Ratheesh Kannoth
2026-01-19 17:32 ` Jakub Kicinski
2026-01-20 1:37 ` Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 06/13] octeontx2-af: npc: cn20k: Use common APIs Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 07/13] octeontx2-af: npc: cn20k: Prepare for new SoC Ratheesh Kannoth
2026-01-22 8:36 ` Simon Horman
2026-01-23 15:39 ` Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 08/13] octeontx2-af: npc: cn20k: Add new mailboxes for CN20K silicon Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 09/13] octeontx2-af: npc: cn20k: virtual index support Ratheesh Kannoth
2026-01-18 0:40 ` [net-next,v4,09/13] " Jakub Kicinski
2026-01-19 3:39 ` Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 10/13] octeontx2-af: npc: cn20k: Allocate MCAM entry for flow installation Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 11/13] octeontx2-pf: cn20k: Add TC rules support Ratheesh Kannoth
2026-01-18 0:40 ` [net-next,v4,11/13] " Jakub Kicinski
2026-01-19 3:39 ` Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 12/13] octeontx2-af: npc: cn20k: add debugfs support Ratheesh Kannoth
2026-01-13 10:16 ` [PATCH net-next v4 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=20260113101658.4144610-1-rkannoth@marvell.com \
--to=rkannoth@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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