mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 23:30:53 +07:00
pkt_sched: Fix qstats.qlen updating in dump_stats
Some classful qdiscs miss qstats.qlen updating with q.qlen of their child qdiscs in dump_stats methods. Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0522fea650
commit
a19d215843
@ -274,8 +274,10 @@ static int drr_dump_class_stats(struct Qdisc *sch, unsigned long arg,
|
||||
struct tc_drr_stats xstats;
|
||||
|
||||
memset(&xstats, 0, sizeof(xstats));
|
||||
if (cl->qdisc->q.qlen)
|
||||
if (cl->qdisc->q.qlen) {
|
||||
xstats.deficit = cl->deficit;
|
||||
cl->qdisc->qstats.qlen = cl->qdisc->q.qlen;
|
||||
}
|
||||
|
||||
if (gnet_stats_copy_basic(d, &cl->bstats) < 0 ||
|
||||
gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 ||
|
||||
|
@ -193,6 +193,7 @@ 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, &sch->bstats) < 0 ||
|
||||
gnet_stats_copy_queue(d, &sch->qstats) < 0)
|
||||
return -1;
|
||||
|
@ -359,6 +359,7 @@ static int multiq_dump_class_stats(struct Qdisc *sch, unsigned long cl,
|
||||
struct Qdisc *cl_q;
|
||||
|
||||
cl_q = q->queues[cl - 1];
|
||||
cl_q->qstats.qlen = cl_q->q.qlen;
|
||||
if (gnet_stats_copy_basic(d, &cl_q->bstats) < 0 ||
|
||||
gnet_stats_copy_queue(d, &cl_q->qstats) < 0)
|
||||
return -1;
|
||||
|
@ -322,6 +322,7 @@ static int prio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
|
||||
struct Qdisc *cl_q;
|
||||
|
||||
cl_q = q->queues[cl - 1];
|
||||
cl_q->qstats.qlen = cl_q->q.qlen;
|
||||
if (gnet_stats_copy_basic(d, &cl_q->bstats) < 0 ||
|
||||
gnet_stats_copy_queue(d, &cl_q->qstats) < 0)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user