net: mscc: ocelot: offload egress VLAN rewriting to VCAP ES0
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>
Fri, 2 Oct 2020 12:02:24 +0000 (15:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2020 22:40:30 +0000 (15:40 -0700)
commit2f17c050d8926a62ed53dce6d8a703f38c4d5d6f
tree2cb1ac649e9035e779bb6b5e4210d2d44f1a4fe9
parent75944fda1dfe836fdd406bef6cb3cc8a80f7af83
net: mscc: ocelot: offload egress VLAN rewriting to VCAP ES0

VCAP ES0 is an egress VCAP operating on all outgoing frames.
This patch added ES0 driver to support vlan push action of tc filter.
Usage:

tc filter add dev swp1 egress protocol 802.1Q flower indev swp0 skip_sw \
        vlan_id 1 vlan_prio 1 action vlan push id 2 priority 2

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot_flower.c
drivers/net/ethernet/mscc/ocelot_vcap.c
drivers/net/ethernet/mscc/ocelot_vcap.h