[PATCH net-next 0/5] net: dsa: lan9645x: add VLAN and bridge offload
From: Jens Emil Schulz Østergaard
Date: Tue Nov 24 2026 - 03:57:56 EST
This series adds bridge offload to the LAN9645x DSA driver.
The MAC table is keyed on (MAC, VID), so at most one VLAN-aware bridge
can be offloaded. VLAN-unaware bridges are kept apart by classifying
their ports to a reserved VID per bridge, so up to 8 bridges can be
offloaded in total, at most one of them VLAN-aware.
With FDB isolation and the FDB and MDB callbacks, DSA enables unicast
and multicast filtering on standalone ports. Host addresses are
installed as MAC table entries towards the CPU, and unknown unicast and
unregistered multicast only reach the CPU while a port is promiscuous or
allmulti. The flood masks are global, so one such port lets that traffic
from every port reach the CPU.
Patch 1 adds the ANA_ANEVENTS register to the generated register macros.
Patch 2 adds VLAN support for VLAN-aware and VLAN-unaware bridges. VIDs
4032-4095 are reserved for internal use. Standalone ports use VID 0, and
the ports of VLAN-unaware bridge n use VID 4096 - n, so each
VLAN-unaware bridge gets its own FDB domain in the (MAC, VID) keyed MAC
table.
Patch 3 adds the MAC table and the FDB callbacks, with FDB isolation and
assisted learning on the CPU port.
Patch 4 adds the MDB callbacks. Each L2 multicast group uses one of the
general purpose PGIDs as its port mask. IP multicast groups carry the
port mask in the MAC table entry.
Patch 5 adds bridge offload. We support offload of 8 unaware bridges, and
at most 1 VLAN-aware bridge.
Signed-off-by: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@xxxxxxxxxxxxx>
---
Jens Emil Schulz Østergaard (5):
net: dsa: lan9645x: add the analyzer event register
net: dsa: lan9645x: add vlan support
net: dsa: lan9645x: add mac table integration
net: dsa: lan9645x: add mdb management
net: dsa: lan9645x: add bridge support
drivers/net/dsa/microchip/lan9645x/Makefile | 3 +
drivers/net/dsa/microchip/lan9645x/lan9645x_mac.c | 267 ++++++++++
drivers/net/dsa/microchip/lan9645x/lan9645x_main.c | 564 ++++++++++++++++++++-
drivers/net/dsa/microchip/lan9645x/lan9645x_main.h | 114 +++++
drivers/net/dsa/microchip/lan9645x/lan9645x_mdb.c | 256 ++++++++++
drivers/net/dsa/microchip/lan9645x/lan9645x_port.c | 14 +
drivers/net/dsa/microchip/lan9645x/lan9645x_regs.h | 196 +++++++
drivers/net/dsa/microchip/lan9645x/lan9645x_vlan.c | 429 ++++++++++++++++
8 files changed, 1832 insertions(+), 11 deletions(-)
---
base-commit: eb6d6c80d35449c27471b1874f13066c09a8964d
change-id: 20261118-dsa-lan9645x-add-vlan-and-bridge-offload-9b28e691f883
Best regards,
--
Jens Emil Schulz Østergaard <jensemil.schulzostergaard@xxxxxxxxxxxxx>