diff options
author | Leslie Monis <lesliemonis@gmail.com> | 2019-12-26 00:34:18 +0530 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2019-12-29 09:57:27 -0800 |
commit | e819d3a03dd19ed3dd0f50bd128f62f972e8240f (patch) | |
tree | 026d74977e2bf8edc477e003800e1ac790d3308d | |
parent | 669314e817113ad25f03deb0efdb9ef54a658c03 (diff) |
tc: fq_codel: fix missing statistic in JSON output
Print JSON object even if tc_fq_codel_xstats->class_stats.drop_next
is negative.
Cc: Toke Høiland-Jørgensen <toke@toke.dk>
Fixes: 997f2dc19378 ("tc: Add JSON output of fq_codel stats")
Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r-- | tc/q_fq_codel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tc/q_fq_codel.c b/tc/q_fq_codel.c index 376ac50d..d002940d 100644 --- a/tc/q_fq_codel.c +++ b/tc/q_fq_codel.c @@ -275,12 +275,12 @@ static int fq_codel_print_xstats(struct qdisc_util *qu, FILE *f, sprint_time(st->class_stats.ldelay, b1)); if (st->class_stats.dropping) { print_bool(PRINT_ANY, "dropping", " dropping", true); + print_int(PRINT_JSON, "drop_next", NULL, + st->class_stats.drop_next); if (st->class_stats.drop_next < 0) print_string(PRINT_FP, NULL, " drop_next -%s", sprint_time(-st->class_stats.drop_next, b1)); else { - print_uint(PRINT_JSON, "drop_next", NULL, - st->class_stats.drop_next); print_string(PRINT_FP, NULL, " drop_next %s", sprint_time(st->class_stats.drop_next, b1)); } |