diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-05-25 21:53:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-29 09:49:15 -0400 |
commit | 6172abc1e2ea12743f368875576952ddf4ebe88c (patch) | |
tree | fc589cda95569147e3488fcf7322f2e05641f653 /include/net/sch_generic.h | |
parent | nfp: abm: add simple RED offload (diff) | |
download | wireguard-linux-6172abc1e2ea12743f368875576952ddf4ebe88c.tar.xz wireguard-linux-6172abc1e2ea12743f368875576952ddf4ebe88c.zip |
net: sched: add qstats.qlen to qlen
AFAICT struct gnet_stats_queue.qlen is not used in Qdiscs.
It may, however, be useful for offloads to report HW queue
length there. Add that value to the result of qdisc_qlen_sum().
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 827a3711dc68..6488daa32f82 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -350,14 +350,14 @@ static inline int qdisc_qlen(const struct Qdisc *q) static inline int qdisc_qlen_sum(const struct Qdisc *q) { - __u32 qlen = 0; + __u32 qlen = q->qstats.qlen; int i; if (q->flags & TCQ_F_NOLOCK) { for_each_possible_cpu(i) qlen += per_cpu_ptr(q->cpu_qstats, i)->qlen; } else { - qlen = q->q.qlen; + qlen += q->q.qlen; } return qlen; |