net: sched: extract common action counters update code into function
[linux-2.6-microblaze.git] / net / sched / act_gact.c
index 324f1d1..569cec6 100644 (file)
@@ -177,15 +177,7 @@ static void tcf_gact_stats_update(struct tc_action *a, u64 bytes, u32 packets,
        int action = READ_ONCE(gact->tcf_action);
        struct tcf_t *tm = &gact->tcf_tm;
 
-       _bstats_cpu_update(this_cpu_ptr(gact->common.cpu_bstats), bytes,
-                          packets);
-       if (action == TC_ACT_SHOT)
-               this_cpu_ptr(gact->common.cpu_qstats)->drops += packets;
-
-       if (hw)
-               _bstats_cpu_update(this_cpu_ptr(gact->common.cpu_bstats_hw),
-                                  bytes, packets);
-
+       tcf_action_update_stats(a, bytes, packets, action == TC_ACT_SHOT, hw);
        tm->lastuse = max_t(u64, tm->lastuse, lastuse);
 }