[PATCH net-next 0/6] Egress VLAN modification using VCAP ES0 on Ocelot switches
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2021-10-01 15:15:47
This patch set adds support for modifying a VLAN ID at the egress stage
of Ocelot/Felix switch ports. It is useful for replicating a packet on
multiple ports, and each egress port sends it using a different VLAN ID.
Tested by rewriting the VLAN ID of both
(a) packets injected from the CPU port
(b) packets received from an external station on a front-facing port
Adding a selftest to make sure it doesn't bit-rot, and if it does, that
it can be traced back easily.
Vladimir Oltean (6):
net: mscc: ocelot: support egress VLAN rewriting via VCAP ES0
net: mscc: ocelot: write full VLAN TCI in the injection header
net: dsa: tag_ocelot: set the classified VLAN during xmit
selftests: net: mscc: ocelot: bring up the ports automatically
selftests: net: mscc: ocelot: rename the VLAN modification test to
ingress
selftests: net: mscc: ocelot: add a test for egress VLAN modification
drivers/net/ethernet/mscc/ocelot.c | 2 +-
drivers/net/ethernet/mscc/ocelot_flower.c | 125 +++++++++++++++---
include/linux/dsa/ocelot.h | 4 +-
include/soc/mscc/ocelot_vcap.h | 10 ++
net/dsa/tag_ocelot.c | 39 ++++++
.../drivers/net/ocelot/tc_flower_chains.sh | 50 ++++++-
6 files changed, 204 insertions(+), 26 deletions(-)
--
2.25.1