diff options
author | Iwan R Timmer <irtimmer@gmail.com> | 2019-11-07 22:11:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-11 21:51:03 +0100 |
commit | f0942e00a1abb6404ca4302c66497fc623676c11 (patch) | |
tree | 2da4d3d9234e528b053c147d41d8f4ff5c8c86e2 /drivers/net/dsa/mv88e6xxx/chip.h | |
parent | net: dsa: mv88e6xxx: Split monitor port configuration (diff) | |
download | linux-f0942e00a1abb6404ca4302c66497fc623676c11.tar.xz linux-f0942e00a1abb6404ca4302c66497fc623676c11.zip |
net: dsa: mv88e6xxx: Add support for port mirroring
Add support for configuring port mirroring through the cls_matchall
classifier. We do a full ingress and/or egress capture towards a
capture port. It allows setting a different capture port for ingress
and egress traffic.
It keeps track of the mirrored ports and the destination ports to
prevent changes to the capture port while other ports are being
mirrored.
Signed-off-by: Iwan R Timmer <irtimmer@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.h')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h index 9fc93b1a9f74..8a8e38bfb161 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.h +++ b/drivers/net/dsa/mv88e6xxx/chip.h @@ -233,6 +233,8 @@ struct mv88e6xxx_port { u64 vtu_member_violation; u64 vtu_miss_violation; u8 cmode; + bool mirror_ingress; + bool mirror_egress; unsigned int serdes_irq; }; @@ -316,6 +318,10 @@ struct mv88e6xxx_chip { u16 evcap_config; u16 enable_count; + /* Current ingress and egress monitor ports */ + int egress_dest_port; + int ingress_dest_port; + /* Per-port timestamping resources. */ struct mv88e6xxx_port_hwtstamp port_hwtstamp[DSA_MAX_PORTS]; |