net: sparx5: add port mirroring implementation
authorDaniel Machon <daniel.machon@microchip.com>
Sat, 20 Apr 2024 19:29:12 +0000 (21:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2024 12:08:06 +0000 (13:08 +0100)
commit4e50d72b3b95fd1ba678f1fab395c3f45105d6bd
tree72f404e82d6872796624a1e062cf40fc885e8e84
parent1ede4acf045ced70d9b72465e2e968aec71e0a42
net: sparx5: add port mirroring implementation

The hardware supports three independent mirroring probes. Each probe can
be configured to mirror rx or tx traffic (direction).

Using tc matchall, it is now possible to add a source port and a monitor
port to a mirror probe. Depending on the mirror direction, rx or tx
traffic from a source port will be mirrored to the monitor port.

A single source port can be a member of multiple mirror probes.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/sparx5/Makefile
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
drivers/net/ethernet/microchip/sparx5/sparx5_mirror.c [new file with mode: 0644]