]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc/m_estimator: Print proper value for estimator interval in raw.
authorJamie Gloudon <jamie.gloudon@gmx.fr>
Fri, 17 Jul 2020 15:05:30 +0000 (11:05 -0400)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 20 Jul 2020 20:25:56 +0000 (13:25 -0700)
While looking at the estimator code, I noticed an incorrect interval
number printed in raw for the handles. This patch fixes the formatting.

Before patch:

root@bytecenter.fr:~# tc -r filter add dev eth0 ingress estimator
250ms 999ms matchall action police avrate 12mbit conform-exceed drop
[estimator i=4294967294 e=2]

After patch:

root@bytecenter.fr:~# tc -r filter add dev eth0 ingress estimator
250ms 999ms matchall action police avrate 12mbit conform-exceed drop
[estimator i=-2 e=2]

Signed-off-by: Jamie Gloudon <jamie.gloudon@gmx.fr>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/m_estimator.c

index ef62e1bbaee04279526d76b93466232e80ac35ee..b5f4c860c60603e7b0d8225a417b67d8f4c7822e 100644 (file)
@@ -57,7 +57,7 @@ int parse_estimator(int *p_argc, char ***p_argv, struct tc_estimator *est)
                return -1;
        }
        if (show_raw)
-               fprintf(stderr, "[estimator i=%u e=%u]\n", est->interval, est->ewma_log);
+               fprintf(stderr, "[estimator i=%hhd e=%u]\n", est->interval, est->ewma_log);
        *p_argc = argc;
        *p_argv = argv;
        return 0;