Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Hagen Paul Pfeifer <hagen@jauu.net>, David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>
Subject: [PATCH net-next] netem: fix build error on 32bit arches
Date: Thu, 01 Dec 2011 10:32:14 +0100	[thread overview]
Message-ID: <1322731934.2335.12.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> (raw)
In-Reply-To: <1322730108.2335.3.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

ERROR: "__udivdi3" [net/sched/sch_netem.ko] undefined!

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/sched/sch_netem.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 9b7af9f..3bfd733 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -301,7 +301,10 @@ static psched_tdiff_t tabledist(psched_tdiff_t mu, psched_tdiff_t sigma,
 
 static psched_time_t packet_len_2_sched_time(unsigned int len, u32 rate)
 {
-	return PSCHED_NS2TICKS((u64)len * NSEC_PER_SEC / rate);
+	u64 ticks = (u64)len * NSEC_PER_SEC;
+
+	do_div(ticks, rate);
+	return PSCHED_NS2TICKS(ticks);
 }
 
 /*

  reply	other threads:[~2011-12-01  9:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 22:20 [PATCH v3 net-next 1/2] netem: rate extension Hagen Paul Pfeifer
2011-11-30 22:20 ` [PATCH v3 net-next 2/2] netem: add cell concept to simulate special MAC behavior Hagen Paul Pfeifer
2011-12-01  3:30   ` Eric Dumazet
2011-12-01  8:25     ` Hagen Paul Pfeifer
2011-12-01  9:01       ` Eric Dumazet
2011-12-01  9:32         ` Eric Dumazet [this message]
2011-12-01  9:46           ` [PATCH net-next] netem: fix build error on 32bit arches Hagen Paul Pfeifer
2011-12-01 11:04           ` David Laight
2011-12-01 11:19             ` Eric Dumazet
2011-12-01 17:46           ` David Miller
2011-12-01  9:36         ` [PATCH v3 net-next 2/2] netem: add cell concept to simulate special MAC behavior Hagen Paul Pfeifer
2011-12-01 16:24           ` Stephen Hemminger
2011-12-01 16:38             ` David Laight
2011-12-01 16:57               ` Stephen Hemminger
2011-12-01 18:25                 ` Rick Jones
2011-12-01  4:19 ` [PATCH v3 net-next 1/2] netem: rate extension David Miller

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=1322731934.2335.12.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hagen@jauu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox