summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-11-30 23:32:14 +0000
committerDavid S. Miller <davem@davemloft.net>2011-12-01 11:40:19 -0500
commitfc33cc72423ed3474cd51bc8bd7c1cdc22a78e1a (patch)
tree55aa0076a9716d848ce3eefcea1c7375f526cd71 /net/sched
parent8aa953d03eea1190fdde03089947bba09e5399fe (diff)
downloadop-kernel-dev-fc33cc72423ed3474cd51bc8bd7c1cdc22a78e1a.zip
op-kernel-dev-fc33cc72423ed3474cd51bc8bd7c1cdc22a78e1a.tar.gz
netem: fix build error on 32bit arches
ERROR: "__udivdi3" [net/sched/sch_netem.ko] undefined! Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_netem.c5
1 files changed, 4 insertions, 1 deletions
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);
}
/*
OpenPOWER on IntegriCloud