spectrum_flower: Implement gact trap TC action offload
authorJiri Pirko <jiri@mellanox.com>
Tue, 6 Jun 2017 12:12:07 +0000 (14:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jun 2017 16:45:24 +0000 (12:45 -0400)
Just use the previously prepared infrastructure and offload the gact
trap action to ACL.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c

index 13af8e3588479b31903345ff94e4634cb3d1060c..21bb2bf62d3edb3a12c57feac3ff363b304092c7 100644 (file)
@@ -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;