[PATCH iproute2-next] tc: fq: display unthrottle latency
From: Eric Dumazet <hidden>
Date: 2016-09-28 13:23:17
From: Eric Dumazet <redacted> In linux-4.9 fq packet scheduler got a new stat : unthrottle_latency in nano second units. Gives a good indication of system load or timer implementation latencies. Signed-off-by: Eric Dumazet <redacted> --- include/linux/pkt_sched.h | 2 +- tc/q_fq.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index f8e39db..df7451d 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h@@ -811,7 +811,7 @@ struct tc_fq_qd_stats { __u32 flows; __u32 inactive_flows; __u32 throttled_flows; - __u32 pad; + __u32 unthrottle_latency_ns; }; /* Heavy-Hitter Filter */
diff --git a/tc/q_fq.c b/tc/q_fq.c
index 90147a6..c9efbfc 100644
--- a/tc/q_fq.c
+++ b/tc/q_fq.c@@ -312,6 +312,9 @@ static int fq_print_xstats(struct qdisc_util *qu, FILE *f, fprintf(f, ", %llu throttled", st->throttled); + if (st->unthrottle_latency_ns) + fprintf(f, ", %u ns latency", st->unthrottle_latency_ns); + if (st->flows_plimit) fprintf(f, ", %llu flows_plimit", st->flows_plimit);