]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sched/act_api.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux.git] / net / sched / act_api.c
index 2095c83ce7730d49550103a8efad943d28815617..cd08df91351d25635d487b2df89db27118280066 100644 (file)
@@ -426,11 +426,9 @@ int tcf_action_exec(struct sk_buff *skb, struct tc_action **actions,
 {
        int ret = -1, i;
 
-       if (skb->tc_verd & TC_NCLS) {
-               skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
-               ret = TC_ACT_OK;
-               goto exec_done;
-       }
+       if (skb_skip_tc_classify(skb))
+               return TC_ACT_OK;
+
        for (i = 0; i < nr_actions; i++) {
                const struct tc_action *a = actions[i];
 
@@ -439,9 +437,8 @@ int tcf_action_exec(struct sk_buff *skb, struct tc_action **actions,
                if (ret == TC_ACT_REPEAT)
                        goto repeat;    /* we need a ttl - JHS */
                if (ret != TC_ACT_PIPE)
-                       goto exec_done;
+                       break;
        }
-exec_done:
        return ret;
 }
 EXPORT_SYMBOL(tcf_action_exec);
@@ -900,8 +897,6 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
                        goto err;
                }
                act->order = i;
-               if (event == RTM_GETACTION)
-                       act->tcfa_refcnt++;
                list_add_tail(&act->list, &actions);
        }
 
@@ -914,7 +909,8 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
                return ret;
        }
 err:
-       tcf_action_destroy(&actions, 0);
+       if (event != RTM_GETACTION)
+               tcf_action_destroy(&actions, 0);
        return ret;
 }