diff options
author | Leslie Monis <lesliemonis@gmail.com> | 2019-02-27 04:00:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-27 05:55:38 +0300 |
commit | ff8285f81822dc8f528b36b6c5c8ab132367e92d (patch) | |
tree | 0edf40ff6ff3d082b82b6a91b0373f95bbc1866a /net/sched | |
parent | 3b40bf4e24d13a858b7e58687ed9580157bcf17e (diff) | |
download | linux-ff8285f81822dc8f528b36b6c5c8ab132367e92d.tar.xz |
net: sched: pie: fix 64-bit division
Use div_u64() to resolve build failures on 32-bit platforms.
Fixes: 3f7ae5f3dc52 ("net: sched: pie: add more cases to auto-tune alpha and beta")
Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_pie.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c index 4c0670b6aec1..f93cfe034c72 100644 --- a/net/sched/sch_pie.c +++ b/net/sched/sch_pie.c @@ -429,7 +429,7 @@ static void calculate_probability(struct Qdisc *sch) */ if (qdelay == 0 && qdelay_old == 0 && update_prob) - q->vars.prob = (q->vars.prob * 98) / 100; + q->vars.prob = 98 * div_u64(q->vars.prob, 100); q->vars.qdelay = qdelay; q->vars.qlen_old = qlen; |