diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-03-16 23:41:42 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-18 03:42:47 +0300 |
commit | f2a0e216bee5d95e2c2d916a8815a659cd3703c2 (patch) | |
tree | 15be089d2da299b7f687eef2c84f2a05d6667b8e /drivers/net/ethernet/mscc/ocelot.c | |
parent | c3d427eac90f8788f510d8d26931afd117bb6406 (diff) | |
download | linux-f2a0e216bee5d95e2c2d916a8815a659cd3703c2.tar.xz |
net: mscc: ocelot: offload per-flow mirroring using tc-mirred and VCAP IS2
Per-flow mirroring with the VCAP IS2 TCAM (in itself handled as an
offload for tc-flower) is done by setting the MIRROR_ENA bit from the
action vector of the filter. The packet is mirrored to the port mask
configured in the ANA:ANA:MIRRORPORTS register (the same port mask as
the destinations for port-based mirroring).
Functionality was tested with:
tc qdisc add dev swp3 clsact
tc filter add dev swp3 ingress protocol ip \
flower skip_sw ip_proto icmp \
action mirred egress mirror dev swp1
and pinging through swp3, while seeing that the ICMP replies are
mirrored towards swp1.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot.c')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index d38a9b498490..e443bd8b2d09 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -3023,8 +3023,8 @@ int ocelot_port_del_dscp_prio(struct ocelot *ocelot, int port, u8 dscp, u8 prio) } EXPORT_SYMBOL_GPL(ocelot_port_del_dscp_prio); -static struct ocelot_mirror *ocelot_mirror_get(struct ocelot *ocelot, int to, - struct netlink_ext_ack *extack) +struct ocelot_mirror *ocelot_mirror_get(struct ocelot *ocelot, int to, + struct netlink_ext_ack *extack) { struct ocelot_mirror *m = ocelot->mirror; @@ -3053,7 +3053,7 @@ static struct ocelot_mirror *ocelot_mirror_get(struct ocelot *ocelot, int to, return m; } -static void ocelot_mirror_put(struct ocelot *ocelot) +void ocelot_mirror_put(struct ocelot *ocelot) { struct ocelot_mirror *m = ocelot->mirror; |