lkml.org 
[lkml]   [2022]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.19 213/365] net: sched: fix misuse of qcpu->backlog in gnet_stats_add_queue_cpu
    Date
    From: Zhengchao Shao <shaozhengchao@huawei.com>

    commit de64b6b6fb6f369840d171b7c5a9baf31b8b2630 upstream.

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/core/gen_stats.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/core/gen_stats.c
    +++ b/net/core/gen_stats.c
    @@ -345,7 +345,7 @@ static void gnet_stats_add_queue_cpu(str
    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;

    \
     
     \ /
      Last update: 2022-08-23 11:03    [W:4.023 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site