]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/sched/sch_mq.c
net: sched: restrict use of qstats qlen
[mirror_ubuntu-artful-kernel.git] / net / sched / sch_mq.c
index d3a27fb607af762681cf9af8b43be765137bc832..6416a69420620c564d40cfd3db5fa82df9bd3010 100644 (file)
@@ -112,7 +112,6 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb)
                sch->q.qlen             += qdisc->q.qlen;
                sch->bstats.bytes       += qdisc->bstats.bytes;
                sch->bstats.packets     += qdisc->bstats.packets;
-               sch->qstats.qlen        += qdisc->qstats.qlen;
                sch->qstats.backlog     += qdisc->qstats.backlog;
                sch->qstats.drops       += qdisc->qstats.drops;
                sch->qstats.requeues    += qdisc->qstats.requeues;
@@ -200,9 +199,8 @@ static int mq_dump_class_stats(struct Qdisc *sch, unsigned long cl,
        struct netdev_queue *dev_queue = mq_queue_get(sch, cl);
 
        sch = dev_queue->qdisc_sleeping;
-       sch->qstats.qlen = sch->q.qlen;
        if (gnet_stats_copy_basic(d, NULL, &sch->bstats) < 0 ||
-           gnet_stats_copy_queue(d, &sch->qstats) < 0)
+           gnet_stats_copy_queue(d, &sch->qstats, sch->q.qlen) < 0)
                return -1;
        return 0;
 }