• Sebastian Andrzej Siewior's avatar
    mq, mqprio: Use gnet_stats_add_queue(). · 7361df46
    Sebastian Andrzej Siewior authored
    gnet_stats_add_basic() and gnet_stats_add_queue() add up the statistics
    so they can be used directly for both the per-CPU and global case.
    
    gnet_stats_add_queue() copies either Qdisc's per-CPU
    gnet_stats_queue::qlen or the global member. The global
    gnet_stats_queue::qlen isn't touched in the per-CPU case so there is no
    need to consider it in the global-case.
    
    In the per-CPU case, the sum of global gnet_stats_queue::qlen and
    the per-CPU gnet_stats_queue::qlen was assigned to sch->q.qlen and
    sch->qstats.qlen. Now both fields are copied individually.
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7361df46
sch_mqprio.c 16 KB