]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: rtl93xx: dsa: Add support for port based mirroring 20264/head
authorSharadanand Karanjkar <sk@simonwunderlich.de>
Tue, 15 Jul 2025 17:48:05 +0000 (19:48 +0200)
committerRobert Marko <robimarko@gmail.com>
Fri, 3 Oct 2025 17:25:26 +0000 (19:25 +0200)
commitbe84bb3a7808cefb906ba50ecab5170ce4623040
tree9a101e84ee333bb16d6cd4379c5007ce8deb7622
parent8e2284857d386200cde05a34d934815896c44a8e
realtek: rtl93xx: dsa: Add support for port based mirroring

The RTL930X and RTL931X SoCs support port-based, flow-based, and
RSPAN-based mirroring. Like for other SoCs from the realtek target, only
the port based port mirroring can be exposed using Linux's tc subsystem.

The port_mirror_add() implementation was updated with the following
considerations for RTL93xx SoCs:

* mirrored packets must pass through the TX pipeline of the mirroring
  port, so they are subject to configuration such as VLAN tagging,
  remarking, and EVC
* when a packet hits both source ports (SPM) and destination port (DPM) of
  a mirror group, the egress port traffic will be mirrored

The port_mirror_del() function doesn't require any modifications.

Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Co-developed-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20264
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c