public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v3 00/10] Switch support
@ 2026-01-09 10:30 Ratheesh Kannoth
  2026-01-09 10:30 ` [PATCH net-next v3 01/10] octeontx2-af: switch: Add AF to switch mbox and skeleton files Ratheesh Kannoth
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Ratheesh Kannoth @ 2026-01-09 10:30 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: sgoutham, davem, edumazet, kuba, pabeni, andrew+netdev,
	Ratheesh Kannoth

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
v2 -> v3: Fixed sparse error, Addressed comments from Alok, Kalesh
2.43.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-01-10 22:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 10:30 [PATCH net-next v3 00/10] Switch support Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 01/10] octeontx2-af: switch: Add AF to switch mbox and skeleton files Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 02/10] octeontx2-af: switch: Add switch dev to AF mboxes Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 03/10] octeontx2-pf: switch: Add pf files hierarchy Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 04/10] octeontx2-af: switch: Representor for switch port Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 05/10] octeontx2-af: switch: Enable Switch hw port for all channels Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 06/10] octeontx2-pf: switch: Register for notifier chains Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 07/10] octeontx2: switch: L2 offload support Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 08/10] octeontx2: switch: L3 " Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 09/10] octeontx2: switch: Flow " Ratheesh Kannoth
2026-01-09 10:30 ` [PATCH net-next v3 10/10] octeontx2: switch: trace support Ratheesh Kannoth
2026-01-10 22:49 ` [PATCH net-next v3 00/10] Switch support Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox