OSDN Git Service

net: dsa: mv88e6xxx: Add support for port mirroring
authorIwan R Timmer <irtimmer@gmail.com>
Thu, 7 Nov 2019 21:11:14 +0000 (22:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Nov 2019 20:51:03 +0000 (12:51 -0800)
commitf0942e00a1abb6404ca4302c66497fc623676c11
tree2da4d3d9234e528b053c147d41d8f4ff5c8c86e2
parent5c74c54ce6fff719999ff48f128cf4150ee4ff59
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>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/global1.c
drivers/net/dsa/mv88e6xxx/port.c
drivers/net/dsa/mv88e6xxx/port.h