From: Leslie Monis <lesliemonis@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Leslie Monis <lesliemonis@gmail.com>
Subject: [PATCH net-next] net: sched: pie: fix 64-bit division
Date: Wed, 27 Feb 2019 06:30:06 +0530 [thread overview]
Message-ID: <20190227010006.22219-1-lesliemonis@gmail.com> (raw)
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>
---
net/sched/sch_pie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.17.1
next reply other threads:[~2019-02-27 1:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 1:00 Leslie Monis [this message]
2019-02-27 1:53 ` [PATCH net-next] net: sched: pie: fix 64-bit division Randy Dunlap
2019-02-27 2:55 ` David Miller
2019-02-27 10:11 ` David Laight
2019-02-27 16:12 ` Leslie Monis
2019-02-28 10:10 ` David Laight
2019-02-28 10:16 ` Leslie Monis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190227010006.22219-1-lesliemonis@gmail.com \
--to=lesliemonis@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.