net: sched: extract qstats update code into functions

Extract common code that increments cpu_qstats counters into standalone act
API functions. Change hardware offloaded actions that use percpu counter
allocation to use the new functions instead of accessing cpu_qstats
directly.

This commit doesn't change functionality.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Vlad Buslov
2019-10-30 16:09:02 +02:00
committed by David S. Miller
parent 5e1ad95b63
commit 26b537a88c
6 changed files with 21 additions and 5 deletions

View File

@@ -624,7 +624,7 @@ out:
return action;
drop:
qstats_drop_inc(this_cpu_ptr(p->common.cpu_qstats));
tcf_action_inc_drop_qstats(&p->common);
action = TC_ACT_SHOT;
goto out;
}