summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2022-08-15 11:08:48 +0800
committerJakub Kicinski <kuba@kernel.org>2022-08-16 19:38:20 -0700
commitde64b6b6fb6f369840d171b7c5a9baf31b8b2630 (patch)
tree97e0be03f20d309b02bda29027a3407a066f2c8a /net
parentae806c7805571a9813e41bf6763dd08d0706f4ed (diff)
downloadlinux-de64b6b6fb6f369840d171b7c5a9baf31b8b2630.tar.bz2
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: 448e163f8b9b ("gen_stats: Add gnet_stats_add_queue()") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Link: https://lore.kernel.org/r/20220815030848.276746-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/core/gen_stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c
index a10335b4ba2d..c8d137ef5980 100644
--- a/net/core/gen_stats.c
+++ b/net/core/gen_stats.c
@@ -345,7 +345,7 @@ static void gnet_stats_add_queue_cpu(struct gnet_stats_queue *qstats,
for_each_possible_cpu(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->drops += qcpu->drops;
qstats->requeues += qcpu->requeues;