Skip to content
Snippets Groups Projects
Commit f660af36 authored by Vladimir Oltean's avatar Vladimir Oltean
Browse files

net: dsa: felix: add port mirroring support


Gain support for port mirroring using tc-matchall by forwarding the
calls to the ocelot switch library.

Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
(cherry picked from commit 5e497497)
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
parent b1e5ee28
No related branches found
No related tags found
1 merge request!455CI: Update gitlab-ci
...@@ -1643,6 +1643,24 @@ static void felix_port_policer_del(struct dsa_switch *ds, int port) ...@@ -1643,6 +1643,24 @@ static void felix_port_policer_del(struct dsa_switch *ds, int port)
ocelot_port_policer_del(ocelot, port); ocelot_port_policer_del(ocelot, port);
} }
static int felix_port_mirror_add(struct dsa_switch *ds, int port,
struct dsa_mall_mirror_tc_entry *mirror,
bool ingress, struct netlink_ext_ack *extack)
{
struct ocelot *ocelot = ds->priv;
return ocelot_port_mirror_add(ocelot, port, mirror->to_local_port,
ingress, extack);
}
static void felix_port_mirror_del(struct dsa_switch *ds, int port,
struct dsa_mall_mirror_tc_entry *mirror)
{
struct ocelot *ocelot = ds->priv;
ocelot_port_mirror_del(ocelot, port, mirror->ingress);
}
static int felix_port_setup_tc(struct dsa_switch *ds, int port, static int felix_port_setup_tc(struct dsa_switch *ds, int port,
enum tc_setup_type type, enum tc_setup_type type,
void *type_data) void *type_data)
...@@ -1872,6 +1890,8 @@ const struct dsa_switch_ops felix_switch_ops = { ...@@ -1872,6 +1890,8 @@ const struct dsa_switch_ops felix_switch_ops = {
.port_max_mtu = felix_get_max_mtu, .port_max_mtu = felix_get_max_mtu,
.port_policer_add = felix_port_policer_add, .port_policer_add = felix_port_policer_add,
.port_policer_del = felix_port_policer_del, .port_policer_del = felix_port_policer_del,
.port_mirror_add = felix_port_mirror_add,
.port_mirror_del = felix_port_mirror_del,
.cls_flower_add = felix_cls_flower_add, .cls_flower_add = felix_cls_flower_add,
.cls_flower_del = felix_cls_flower_del, .cls_flower_del = felix_cls_flower_del,
.cls_flower_stats = felix_cls_flower_stats, .cls_flower_stats = felix_cls_flower_stats,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment