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:

committed by
David S. Miller

parent
5e1ad95b63
commit
26b537a88c
@@ -303,7 +303,7 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
|
||||
|
||||
if (err) {
|
||||
out:
|
||||
qstats_overlimit_inc(this_cpu_ptr(m->common.cpu_qstats));
|
||||
tcf_action_inc_overlimit_qstats(&m->common);
|
||||
if (tcf_mirred_is_act_redirect(m_eaction))
|
||||
retval = TC_ACT_SHOT;
|
||||
}
|
||||
|
Reference in New Issue
Block a user