net: sched: pie: change tc_pie_xstats->prob

Commit 105e808c1d ("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 <edumazet@google.com>
Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Leslie Monis 2020-03-10 00:40:33 +05:30 коммит произвёл David S. Miller
Родитель e08ab0b377
Коммит 3f95f55eb5
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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 pie_sched_data *q = qdisc_priv(sch);
struct tc_pie_xstats st = { struct tc_pie_xstats st = {
.prob = q->vars.prob, .prob = q->vars.prob << BITS_PER_BYTE,
.delay = ((u32)PSCHED_TICKS2NS(q->vars.qdelay)) / .delay = ((u32)PSCHED_TICKS2NS(q->vars.qdelay)) /
NSEC_PER_USEC, NSEC_PER_USEC,
.packets_in = q->stats.packets_in, .packets_in = q->stats.packets_in,