]> git.baikalelectronics.ru Git - kernel.git/commit
netem: remove unnecessary 64 bit modulus
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 14 Nov 2017 19:27:02 +0000 (11:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Nov 2017 05:14:16 +0000 (14:14 +0900)
commitb28193b6a7b629de5f85efd03d0f0a54daa40f42
tree67e5e1fab1969ec245fea1b3a232dc16b89c9f32
parent57bf40051f252f6b685d6eb78ff175f6dbb7b0a5
netem: remove unnecessary 64 bit modulus

Fix compilation on 32 bit platforms (where doing modulus operation
with 64 bit requires extra glibc functions) by truncation.
The jitter for table distribution is limited to a 32 bit value
because random numbers are scaled as 32 bit value.

Also fix some whitespace.

Fixes: ceb20df43f3b ("netem: add uapi to express delay and jitter in nanoseconds")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c