OSDN Git Service

mlxsw: spectrum_flower: Offload "ok" termination action
authorJiri Pirko <jiri@mellanox.com>
Mon, 25 Sep 2017 08:58:22 +0000 (10:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Sep 2017 03:26:45 +0000 (20:26 -0700)
If action is "gact_ok", offload it to HW.

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

index f1cedcc..2f0e578 100644 (file)
@@ -63,7 +63,11 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
 
        tcf_exts_to_list(exts, &actions);
        list_for_each_entry(a, &actions, list) {
-               if (is_tcf_gact_shot(a)) {
+               if (is_tcf_gact_ok(a)) {
+                       err = mlxsw_sp_acl_rulei_act_continue(rulei);
+                       if (err)
+                               return err;
+               } else if (is_tcf_gact_shot(a)) {
                        err = mlxsw_sp_acl_rulei_act_drop(rulei);
                        if (err)
                                return err;