Skip to contentSkip to conversation

Revert "tc: pie: change maximum integer value of tc_pie_xstats->prob"

PATCH Applied Leslie Monis 2 participants 2 messages Mar 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "tc: pie: change maximum integer value of tc_pie_xstats->prob"

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.

---
 tc/q_pie.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tc/q_pie.c +2 -2
index e6939652..709a78b4 100644
@@ -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));
 
Signature · 1 line
2.17.1
Applied
#1 lore raw
Quoted 19 lines · Leslie Monis

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.

---
 tc/q_pie.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tc/q_pie.c +0 -0
index e6939652..709a78b4 100644
@@ -223,9 +223,9 @@ static int pie_print_xstats(struct qdisc_util *qu, FILE *f,
 

tc/q_pie.c static int pie_print_xstats(struct qdisc_util *qu, FILE *f, · line 231

Quoted 10 lines
tc/q_pie.c +2 -2
 	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));
 

applied to iproute2-next. Thanks