summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorLeslie Monis <lesliemonis@gmail.com>2019-02-27 06:30:06 +0530
committerDavid S. Miller <davem@davemloft.net>2019-02-26 18:55:38 -0800
commitff8285f81822dc8f528b36b6c5c8ab132367e92d (patch)
tree0edf40ff6ff3d082b82b6a91b0373f95bbc1866a /net/sched
parent3b40bf4e24d13a858b7e58687ed9580157bcf17e (diff)
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.c2
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;