From: Leslie Monis Date: Mon, 9 Mar 2020 19:10:33 +0000 (+0530) Subject: net: sched: pie: change tc_pie_xstats->prob X-Git-Tag: v5.10.7~2946^2~220 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f95f55eb55daa17c047d731d1fb7854e5823478;p=platform%2Fkernel%2Flinux-rpi.git net: sched: pie: change tc_pie_xstats->prob Commit 105e808c1da2 ("pie: remove pie_vars->accu_prob_overflows") changes the scale of probability values in PIE from (2^64 - 1) to (2^56 - 1). This affects the precision of tc_pie_xstats->prob in user space. This patch ensures user space is unaffected. Suggested-by: Eric Dumazet Signed-off-by: Leslie Monis Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c index f52442d..c65077f 100644 --- a/net/sched/sch_pie.c +++ b/net/sched/sch_pie.c @@ -493,7 +493,7 @@ static int pie_dump_stats(struct Qdisc *sch, struct gnet_dump *d) { struct pie_sched_data *q = qdisc_priv(sch); struct tc_pie_xstats st = { - .prob = q->vars.prob, + .prob = q->vars.prob << BITS_PER_BYTE, .delay = ((u32)PSCHED_TICKS2NS(q->vars.qdelay)) / NSEC_PER_USEC, .packets_in = q->stats.packets_in,