diff options
author | Arkadi Sharshevsky <arkadis@mellanox.com> | 2018-01-19 09:24:52 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-21 18:21:30 -0500 |
commit | d0d13c1858a11bfc2b2ab3283ce584f5b0e1693f (patch) | |
tree | c1ada38a3a7858a58cafdcc2e68b25dfd1a4b3da /drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | |
parent | 7928756cd00af6d819fe0d4e759585023fdc48a4 (diff) | |
download | linux-stable-d0d13c1858a11bfc2b2ab3283ce584f5b0e1693f.tar.gz linux-stable-d0d13c1858a11bfc2b2ab3283ce584f5b0e1693f.tar.bz2 linux-stable-d0d13c1858a11bfc2b2ab3283ce584f5b0e1693f.zip |
mlxsw: spectrum_acl: Add support for mirror action
Add support for mirror action. Only one mirror action can be set per rule.
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c index cf7b97d40d78..6ce00e28d4ea 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c @@ -108,6 +108,13 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp, out_dev); if (err) return err; + } else if (is_tcf_mirred_egress_mirror(a)) { + struct net_device *out_dev = tcf_mirred_dev(a); + + err = mlxsw_sp_acl_rulei_act_mirror(mlxsw_sp, rulei, + block, out_dev); + if (err) + return err; } else if (is_tcf_vlan(a)) { u16 proto = be16_to_cpu(tcf_vlan_push_proto(a)); u32 action = tcf_vlan_action(a); |