Skip to content

Commit eb60a8d

Browse files
edumazetdavem330
authored andcommitted
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 <[email protected]> Acked-by: John Fastabend <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 72145a6 commit eb60a8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/sch_generic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ static inline void qdisc_qstats_drop(struct Qdisc *sch)
592592

593593
static inline void qdisc_qstats_cpu_drop(struct Qdisc *sch)
594594
{
595-
qstats_drop_inc(this_cpu_ptr(sch->cpu_qstats));
595+
this_cpu_inc(sch->cpu_qstats->drops);
596596
}
597597

598598
static inline void qdisc_qstats_overlimit(struct Qdisc *sch)

0 commit comments

Comments
 (0)