From: Jiri Pirko Date: Tue, 6 Jun 2017 12:12:07 +0000 (+0200) Subject: spectrum_flower: Implement gact trap TC action offload X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bd5ddba52dc0e2b37ce67e68ba1c419693009185;p=openwrt%2Fstaging%2Fblogic.git spectrum_flower: Implement gact trap TC action offload Just use the previously prepared infrastructure and offload the gact trap action to ACL. Signed-off-by: Jiri Pirko Reviewed-by: Yotam Gigi Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c index 13af8e358847..21bb2bf62d3e 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c @@ -67,6 +67,10 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp, err = mlxsw_sp_acl_rulei_act_drop(rulei); if (err) return err; + } else if (is_tcf_gact_trap(a)) { + err = mlxsw_sp_acl_rulei_act_trap(rulei); + if (err) + return err; } else if (is_tcf_mirred_egress_redirect(a)) { int ifindex = tcf_mirred_ifindex(a); struct net_device *out_dev;