diff options
author | Daniel Turull <daniel.turull@gmail.com> | 2010-06-10 23:08:11 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-10 23:08:11 -0700 |
commit | 07a0f0f07a68014c92c752a5598102372bddf46e (patch) | |
tree | 9429833f5f1f95066d9f4113cf224dcef7c4bd1e /net/core/pktgen.c | |
parent | ae638c47dc040b8def16d05dc6acdd527628f231 (diff) | |
download | linux-07a0f0f07a68014c92c752a5598102372bddf46e.tar.gz linux-07a0f0f07a68014c92c752a5598102372bddf46e.tar.bz2 linux-07a0f0f07a68014c92c752a5598102372bddf46e.zip |
pktgen: Fix accuracy of inter-packet delay.
This patch correct a bug in the delay of pktgen.
It makes sure the inter-packet interval is accurate.
Signed-off-by: Daniel Turull <daniel.turull@gmail.com>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 2ad68da418df..1dacd7ba8dbb 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2170,7 +2170,7 @@ static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until) end_time = ktime_now(); pkt_dev->idle_acc += ktime_to_ns(ktime_sub(end_time, start_time)); - pkt_dev->next_tx = ktime_add_ns(end_time, pkt_dev->delay); + pkt_dev->next_tx = ktime_add_ns(spin_until, pkt_dev->delay); } static inline void set_pkt_overhead(struct pktgen_dev *pkt_dev) |