提交 ff8285f8 编写于 作者: L Leslie Monis 提交者: David S. Miller

net: sched: pie: fix 64-bit division

Use div_u64() to resolve build failures on 32-bit platforms.

Fixes: 3f7ae5f3 ("net: sched: pie: add more cases to auto-tune alpha and beta")
Signed-off-by: NLeslie Monis <lesliemonis@gmail.com>
Reported-by: NRandy Dunlap <rdunlap@infradead.org>
Tested-by: NRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3b40bf4e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册