]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Revert "tc: pie: change maximum integer value of tc_pie_xstats->prob"
authorLeslie Monis <lesliemonis@gmail.com>
Tue, 10 Mar 2020 18:15:49 +0000 (23:45 +0530)
committerDavid Ahern <dsahern@gmail.com>
Tue, 10 Mar 2020 18:29:26 +0000 (18:29 +0000)
This reverts commit 92cfe3260e9110c3d33627847b6eaa153664c79c.

Kernel commit 3f95f55eb55d ("net: sched: pie: change tc_pie_xstats->prob")
removes the need to change the maximum integer value of
tc_pie_stats->prob here.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
tc/q_pie.c

index e693965263d98155a3a66d4e893cb58c0a4dd5f3..709a78b4c7c47f58226c20a0d677583039c137e9 100644 (file)
@@ -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 (2^56 - 1) */
+       /* prob is returned as a fracion of maximum integer value */
        print_float(PRINT_ANY, "prob", "  prob %lg",
-                   (double)st->prob / (double)(UINT64_MAX >> 8));
+                   (double)st->prob / (double)UINT64_MAX);
        print_uint(PRINT_JSON, "delay", NULL, st->delay);
        print_string(PRINT_FP, NULL, " delay %s", sprint_time(st->delay, b1));