diff options
author | Leslie Monis <lesliemonis@gmail.com> | 2020-03-05 21:55:40 +0530 |
---|---|---|
committer | David Ahern <dsahern@gmail.com> | 2020-03-09 02:46:45 +0000 |
commit | 92cfe3260e9110c3d33627847b6eaa153664c79c (patch) | |
tree | 4a95e4acc3693ee202d59555c23ae0470027bfff | |
parent | ad19a18e4263bb527e5a046e44aed02e5998a8de (diff) | |
download | iproute2-92cfe3260e9110c3d33627847b6eaa153664c79c.tar.gz |
tc: pie: change maximum integer value of tc_pie_xstats->prob
Kernel commit 105e808c1da2 ("pie: remove pie_vars->accu_prob_overflows"),
changes the maximum value of tc_pie_xstats->prob from (2^64 - 1) to
(2^56 - 1).
Signed-off-by: Mohit P. Tahiliani <tahiliani@nitk.edu.in>
Signed-off-by: Gautam Ramakrishnan <gautamramk@gmail.com>
Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
-rw-r--r-- | tc/q_pie.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tc/q_pie.c b/tc/q_pie.c index 709a78b4c..e69396526 100644 --- a/tc/q_pie.c +++ b/tc/q_pie.c @@ -223,9 +223,9 @@ static int pie_print_xstats(struct qdisc_util *qu, FILE *f, st = RTA_DATA(xstats); - /* prob is returned as a fracion of maximum integer value */ + /* prob is returned as a fracion of (2^56 - 1) */ print_float(PRINT_ANY, "prob", " prob %lg", - (double)st->prob / (double)UINT64_MAX); + (double)st->prob / (double)(UINT64_MAX >> 8)); print_uint(PRINT_JSON, "delay", NULL, st->delay); print_string(PRINT_FP, NULL, " delay %s", sprint_time(st->delay, b1)); |