Commit de64b6b6 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by Jakub Kicinski

net: sched: fix misuse of qcpu->backlog in gnet_stats_add_queue_cpu

In the gnet_stats_add_queue_cpu function, the qstats->qlen statistics
are incorrectly set to qcpu->backlog.

Fixes: 448e163f ("gen_stats: Add gnet_stats_add_queue()")
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20220815030848.276746-1-shaozhengchao@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ae806c78
...@@ -345,7 +345,7 @@ static void gnet_stats_add_queue_cpu(struct gnet_stats_queue *qstats, ...@@ -345,7 +345,7 @@ static void gnet_stats_add_queue_cpu(struct gnet_stats_queue *qstats,
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
const struct gnet_stats_queue *qcpu = per_cpu_ptr(q, i); const struct gnet_stats_queue *qcpu = per_cpu_ptr(q, i);
qstats->qlen += qcpu->backlog; qstats->qlen += qcpu->qlen;
qstats->backlog += qcpu->backlog; qstats->backlog += qcpu->backlog;
qstats->drops += qcpu->drops; qstats->drops += qcpu->drops;
qstats->requeues += qcpu->requeues; qstats->requeues += qcpu->requeues;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment