aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r--net/core/pktgen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 8604ae245960..8b02df0d354d 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2245,10 +2245,8 @@ static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until)
2245 hrtimer_set_expires(&t.timer, spin_until); 2245 hrtimer_set_expires(&t.timer, spin_until);
2246 2246
2247 remaining = ktime_to_ns(hrtimer_expires_remaining(&t.timer)); 2247 remaining = ktime_to_ns(hrtimer_expires_remaining(&t.timer));
2248 if (remaining <= 0) { 2248 if (remaining <= 0)
2249 pkt_dev->next_tx = ktime_add_ns(spin_until, pkt_dev->delay); 2249 goto out;
2250 return;
2251 }
2252 2250
2253 start_time = ktime_get(); 2251 start_time = ktime_get();
2254 if (remaining < 100000) { 2252 if (remaining < 100000) {
@@ -2273,7 +2271,9 @@ static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until)
2273 } 2271 }
2274 2272
2275 pkt_dev->idle_acc += ktime_to_ns(ktime_sub(end_time, start_time)); 2273 pkt_dev->idle_acc += ktime_to_ns(ktime_sub(end_time, start_time));
2274out:
2276 pkt_dev->next_tx = ktime_add_ns(spin_until, pkt_dev->delay); 2275 pkt_dev->next_tx = ktime_add_ns(spin_until, pkt_dev->delay);
2276 destroy_hrtimer_on_stack(&t.timer);
2277} 2277}
2278 2278
2279static inline void set_pkt_overhead(struct pktgen_dev *pkt_dev) 2279static inline void set_pkt_overhead(struct pktgen_dev *pkt_dev)