47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
From 66702fb9baf277b2eb6d44a7983d5333ca2a0a2c Mon Sep 17 00:00:00 2001
|
|
From: Jamie Gloudon <jamie.gloudon@gmx.fr>
|
|
Date: Fri, 17 Jul 2020 11:05:30 -0400
|
|
Subject: tc/m_estimator: Print proper value for estimator interval in raw.
|
|
|
|
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>
|
|
|
|
Conflict:NA
|
|
Reference:https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit?id=66702fb9baf277b2eb6d44a7983d5333ca2a0a2c
|
|
|
|
---
|
|
tc/m_estimator.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/tc/m_estimator.c b/tc/m_estimator.c
|
|
index ef62e1bba..b5f4c860c 100644
|
|
--- a/tc/m_estimator.c
|
|
+++ b/tc/m_estimator.c
|
|
@@ -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;
|
|
--
|
|
cgit 1.2.3-korg
|
|
|