diff mbox series

[iproute2,v2,1/2] tc: pie: change maximum integer value of tc_pie_xstats->prob

Message ID 20190327153606.5524-2-lesliemonis@gmail.com
State Accepted
Delegated to: stephen hemminger
Headers show
Series tc: pie: make tc/q_pie.c consistent with the kernel | expand

Commit Message

Leslie Monis March 27, 2019, 3:36 p.m. UTC
tc_pie_xstats->prob has a maximum value of (2^64 - 1).

Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
---
 tc/q_pie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tc/q_pie.c b/tc/q_pie.c
index f7924ef5..236ea31b 100644
--- a/tc/q_pie.c
+++ b/tc/q_pie.c
@@ -198,7 +198,7 @@  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 */
 	fprintf(f, "prob %f delay %uus avg_dq_rate %u\n",
-		(double)st->prob / (double)0xffffffff, st->delay,
+		(double)st->prob / UINT64_MAX, st->delay,
 		st->avg_dq_rate);
 	fprintf(f, "pkts_in %u overlimit %u dropped %u maxq %u ecn_mark %u\n",
 		st->packets_in, st->overlimit, st->dropped, st->maxq,