From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<andrew+netdev@lunn.ch>
Cc: <sgoutham@marvell.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
Ratheesh Kannoth <rkannoth@marvell.com>
Subject: [PATCH net-next v2 00/10] Switch support
Date: Wed, 7 Jan 2026 18:53:58 +0530 [thread overview]
Message-ID: <20260107132408.3904352-1-rkannoth@marvell.com> (raw)
Marvell CN10K switch hardware is capable of accelerating L2, L3,
and flow. The switch hardware runs an application that
creates a logical port for each representor device when representors
are enabled through devlink.
This patch series implements communication from Host OS to switch
HW and vice versa.
|--------------------------------|
| HOST OS |
| |
| eth0(rep-eth0) eth1(rep-eth1) |
| | | |
| | | |
---------------------------------|
| |
| |
---------------------------------|
| lport0 lport1 |
| |
| switch |
| |
---------------------------------|
When representors are created, corresponding "logical ports" are
created in switchdev. The switch hardware allocates a NIX PF and
configures its send queues. These send queues should be able to
transmit packets to any channel, as send queues as from same NIX PF.
Switch is capable of forwarding packets between these logical ports.
Notifier callbacks are registered to receive system events such as
FDB add/delete and FIB add/delete. Flow add/delete operations are
handled through the .ndo_setup_tc() interface. These events are
captured and processed by the NIC driver and forwarded to the switch
device through the AF driver. All message exchanges use the mailbox
interface.
Bridge acceleration:
FDB add/delete notifications are processed, and learned SMAC
information is sent to the switch hardware. The switch inserts a
hardware rule to accelerate packets destined to the MAC address.
Flow acceleration:
NFT and OVS applications call .ndo_setup_tc() to push rules to
hardware for acceleration. This interface is used to forward
rules to the switch hardware through the mailbox interface.
Ratheesh Kannoth (10):
octeontx2-af: switch: Add AF to switch mbox and skeleton files
Mbox message for AF to switch
octeontx2-af: switch: Add switch dev to AF mboxes
Switch to AF driver mbox messages
octeontx2-pf: switch: Add pf files hierarchy
PF skeleton files for bridge, fib and flow
octeontx2-af: switch: Representor for switch port
Switch ID is copied and sent to switch when Representors are
enabled thru devlink. Upon receipt of the message, switch queries
AF driver to get info on rep interfaces.
octeontx2-af: switch: Enable Switch hw port for all channels
Switch ports should be configured to TX packets on any channel.
octeontx2-pf: switch: Register for notifier chains.
Notifier callback for various system events.
octeontx2: switch: L2 offload support
Bridge (L2) offload support
octeontx2: switch: L3 offload support
FIB (L3) offload support.
octeontx2: switch: Flow offload support
Flow (5/7 tuple) offload support.
octeontx2: switch: trace support
Trace logs for flow and action
.../net/ethernet/marvell/octeontx2/Kconfig | 12 +
.../ethernet/marvell/octeontx2/af/Makefile | 2 +
.../net/ethernet/marvell/octeontx2/af/mbox.h | 219 ++++++
.../net/ethernet/marvell/octeontx2/af/rvu.c | 111 +++-
.../net/ethernet/marvell/octeontx2/af/rvu.h | 6 +
.../ethernet/marvell/octeontx2/af/rvu_nix.c | 54 +-
.../ethernet/marvell/octeontx2/af/rvu_npc.c | 77 ++-
.../marvell/octeontx2/af/rvu_npc_fs.c | 13 +-
.../ethernet/marvell/octeontx2/af/rvu_rep.c | 3 +-
.../marvell/octeontx2/af/switch/rvu_sw.c | 47 ++
.../marvell/octeontx2/af/switch/rvu_sw.h | 14 +
.../marvell/octeontx2/af/switch/rvu_sw_fl.c | 294 ++++++++
.../marvell/octeontx2/af/switch/rvu_sw_fl.h | 13 +
.../marvell/octeontx2/af/switch/rvu_sw_l2.c | 284 ++++++++
.../marvell/octeontx2/af/switch/rvu_sw_l2.h | 13 +
.../marvell/octeontx2/af/switch/rvu_sw_l3.c | 215 ++++++
.../marvell/octeontx2/af/switch/rvu_sw_l3.h | 11 +
.../ethernet/marvell/octeontx2/nic/Makefile | 8 +-
.../ethernet/marvell/octeontx2/nic/otx2_tc.c | 17 +-
.../marvell/octeontx2/nic/otx2_txrx.h | 2 +
.../ethernet/marvell/octeontx2/nic/otx2_vf.c | 8 +
.../net/ethernet/marvell/octeontx2/nic/rep.c | 10 +
.../marvell/octeontx2/nic/switch/sw_fdb.c | 143 ++++
.../marvell/octeontx2/nic/switch/sw_fdb.h | 18 +
.../marvell/octeontx2/nic/switch/sw_fib.c | 133 ++++
.../marvell/octeontx2/nic/switch/sw_fib.h | 16 +
.../marvell/octeontx2/nic/switch/sw_fl.c | 544 +++++++++++++++
.../marvell/octeontx2/nic/switch/sw_fl.h | 15 +
.../marvell/octeontx2/nic/switch/sw_nb.c | 629 ++++++++++++++++++
.../marvell/octeontx2/nic/switch/sw_nb.h | 31 +
.../marvell/octeontx2/nic/switch/sw_trace.c | 11 +
.../marvell/octeontx2/nic/switch/sw_trace.h | 82 +++
32 files changed, 3040 insertions(+), 15 deletions(-)
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/switch/rvu_sw.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/switch/rvu_sw.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/switch/rvu_sw_fl.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/switch/rvu_sw_fl.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/switch/rvu_sw_l2.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/switch/rvu_sw_l2.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/switch/rvu_sw_l3.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/switch/rvu_sw_l3.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_fdb.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_fdb.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_fib.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_fib.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_fl.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_fl.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_nb.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_nb.h
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_trace.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/switch/sw_trace.h
--
ChangeLog:
v1 -> v2: Fixed build errors
2.43.0
next reply other threads:[~2026-01-07 13:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 13:23 Ratheesh Kannoth [this message]
2026-01-07 13:23 ` [PATCH net-next v2 01/10] octeontx2-af: switch: Add AF to switch mbox and skeleton files Ratheesh Kannoth
2026-01-08 9:02 ` ALOK TIWARI
2026-01-08 9:22 ` Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 02/10] octeontx2-af: switch: Add switch dev to AF mboxes Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 03/10] octeontx2-pf: switch: Add pf files hierarchy Ratheesh Kannoth
2026-01-08 9:13 ` ALOK TIWARI
2026-01-08 9:27 ` Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 04/10] octeontx2-af: switch: Representor for switch port Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 05/10] octeontx2-af: switch: Enable Switch hw port for all channels Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 06/10] octeontx2-pf: switch: Register for notifier chains Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 07/10] octeontx2: switch: L2 offload support Ratheesh Kannoth
2026-01-08 9:07 ` ALOK TIWARI
2026-01-08 9:35 ` Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 08/10] octeontx2: switch: L3 " Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 09/10] octeontx2: switch: Flow " Ratheesh Kannoth
2026-01-08 9:09 ` ALOK TIWARI
2026-01-08 10:05 ` Ratheesh Kannoth
2026-01-08 16:07 ` Kalesh Anakkur Purayil
2026-01-09 4:43 ` Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 10/10] octeontx2: switch: trace support 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=20260107132408.3904352-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