Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / net / sched / act_ct.c
index 2d5ab233349eafd8486540f9a27b67db0b1d17b7..ae0de372b1c8f003caafdf354e68a87676bd7ab7 100644 (file)
@@ -465,16 +465,15 @@ out_push:
        skb_push_rcsum(skb, nh_ofs);
 
 out:
-       bstats_cpu_update(this_cpu_ptr(a->cpu_bstats), skb);
+       tcf_action_update_bstats(&c->common, skb);
        return retval;
 
 drop:
-       qstats_drop_inc(this_cpu_ptr(a->cpu_qstats));
+       tcf_action_inc_drop_qstats(&c->common);
        return TC_ACT_SHOT;
 }
 
 static const struct nla_policy ct_policy[TCA_CT_MAX + 1] = {
-       [TCA_CT_UNSPEC] = { .strict_start_type = TCA_CT_UNSPEC + 1 },
        [TCA_CT_ACTION] = { .type = NLA_U16 },
        [TCA_CT_PARMS] = { .type = NLA_EXACT_LEN, .len = sizeof(struct tc_ct) },
        [TCA_CT_ZONE] = { .type = NLA_U16 },
@@ -656,7 +655,7 @@ static int tcf_ct_fill_params(struct net *net,
 static int tcf_ct_init(struct net *net, struct nlattr *nla,
                       struct nlattr *est, struct tc_action **a,
                       int replace, int bind, bool rtnl_held,
-                      struct tcf_proto *tp,
+                      struct tcf_proto *tp, u32 flags,
                       struct netlink_ext_ack *extack)
 {
        struct tc_action_net *tn = net_generic(net, ct_net_id);
@@ -688,8 +687,8 @@ static int tcf_ct_init(struct net *net, struct nlattr *nla,
                return err;
 
        if (!err) {
-               err = tcf_idr_create(tn, index, est, a,
-                                    &act_ct_ops, bind, true);
+               err = tcf_idr_create_from_flags(tn, index, est, a,
+                                               &act_ct_ops, bind, flags);
                if (err) {
                        tcf_idr_cleanup(tn, index);
                        return err;
@@ -906,11 +905,7 @@ static void tcf_stats_update(struct tc_action *a, u64 bytes, u32 packets,
 {
        struct tcf_ct *c = to_ct(a);
 
-       _bstats_cpu_update(this_cpu_ptr(a->cpu_bstats), bytes, packets);
-
-       if (hw)
-               _bstats_cpu_update(this_cpu_ptr(a->cpu_bstats_hw),
-                                  bytes, packets);
+       tcf_action_update_stats(a, bytes, packets, false, hw);
        c->tcf_tm.lastuse = max_t(u64, c->tcf_tm.lastuse, lastuse);
 }