]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: fq_codel: fix class stat deficit is signed int
authorBenjamin Lee <ben@b1c1l1.com>
Wed, 15 Apr 2020 04:11:12 +0000 (21:11 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 20 Apr 2020 16:34:56 +0000 (09:34 -0700)
The fq_codel class stat deficit is a signed int.  This is a regression
from when JSON output was added.

Fixes: 997f2dc19378 ("tc: Add JSON output of fq_codel stats")
Signed-off-by: Benjamin Lee <ben@b1c1l1.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/q_fq_codel.c

index efed4d28974c355950db43a522500c2787301a12..1c6cf1e0de9ef6aa2400f36008cbc830c37352c0 100644 (file)
@@ -264,7 +264,7 @@ static int fq_codel_print_xstats(struct qdisc_util *qu, FILE *f,
                        st->qdisc_stats.old_flows_len);
        }
        if (st->type == TCA_FQ_CODEL_XSTATS_CLASS) {
-               print_uint(PRINT_ANY, "deficit", "  deficit %u",
+               print_int(PRINT_ANY, "deficit", "  deficit %d",
                        st->class_stats.deficit);
                print_uint(PRINT_ANY, "count", " count %u",
                        st->class_stats.count);