diff options
author | Eric Dumazet <edumazet@google.com> | 2016-08-24 13:23:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-25 19:45:29 -0400 |
commit | eb60a8ddf3c38959cc73821bec5335bed85e0200 (patch) | |
tree | ce35b77f999e39851c209814a4d8ff05eefa1df2 /include/net/sch_generic.h | |
parent | 72145a68e4ee116533df49af4b87aca0aacc179c (diff) |
net: minor optimization in qdisc_qstats_cpu_drop()
per_cpu_inc() is faster (at least on x86) than per_cpu_ptr(xxx)++;
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 0d501779cc68..52a2015667b4 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -592,7 +592,7 @@ static inline void qdisc_qstats_drop(struct Qdisc *sch) | |||
592 | 592 | ||
593 | static inline void qdisc_qstats_cpu_drop(struct Qdisc *sch) | 593 | static inline void qdisc_qstats_cpu_drop(struct Qdisc *sch) |
594 | { | 594 | { |
595 | qstats_drop_inc(this_cpu_ptr(sch->cpu_qstats)); | 595 | this_cpu_inc(sch->cpu_qstats->drops); |
596 | } | 596 | } |
597 | 597 | ||
598 | static inline void qdisc_qstats_overlimit(struct Qdisc *sch) | 598 | static inline void qdisc_qstats_overlimit(struct Qdisc *sch) |