Skip to content

Commit

Permalink
net/sched: act_pedit: use percpu overlimit counter when available
Browse files Browse the repository at this point in the history
Since act_pedit now has access to percpu counters, use the
tcf_action_inc_overlimit_qstats wrapper that will use the percpu
counter whenever they are available.

Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Pedro Tammela authored and Paolo Abeni committed Feb 16, 2023
1 parent 7afd073 commit 2d2e75d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/sched/act_pedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,7 @@ TC_INDIRECT_SCOPE int tcf_pedit_act(struct sk_buff *skb,
goto done;

bad:
spin_lock(&p->tcf_lock);
p->tcf_qstats.overlimits++;
spin_unlock(&p->tcf_lock);
tcf_action_inc_overlimit_qstats(&p->common);
done:
return p->tcf_action;
}
Expand Down

0 comments on commit 2d2e75d

Please sign in to comment.