]> git.baikalelectronics.ru Git - kernel.git/commit
pktgen: remove ndelay() call
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 20 Oct 2011 21:00:21 +0000 (17:00 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Oct 2011 21:00:21 +0000 (17:00 -0400)
commit3dc61655b1ee867b8714322a9c6fde2cdc909639
treeb12e136753a269684794308df59183329ed553a8
parent9eee80e8f8abbaf971a3aa13cb20c9957da5cf5d
pktgen: remove ndelay() call

Daniel Turull reported inaccuracies in pktgen when using low packet
rates, because we call ndelay(val) with values bigger than 20000.

Instead of calling ndelay() for delays < 100us, we can instead loop
calling ktime_now() only.

Reported-by: Daniel Turull <daniel.turull@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c