Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07a0f0f0 authored by Daniel Turull's avatar Daniel Turull Committed by David S. Miller
Browse files

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: default avatarDaniel Turull <daniel.turull@gmail.com>
Signed-off-by: default avatarRobert Olsson <robert.olsson@its.uu.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae638c47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)