diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 4d11c28ca8ca..b69455217ed6 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -2105,15 +2105,17 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) | |||
2105 | static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until) | 2105 | static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until) |
2106 | { | 2106 | { |
2107 | ktime_t start_time, end_time; | 2107 | ktime_t start_time, end_time; |
2108 | s32 remaining; | 2108 | s64 remaining; |
2109 | struct hrtimer_sleeper t; | 2109 | struct hrtimer_sleeper t; |
2110 | 2110 | ||
2111 | hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); | 2111 | hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); |
2112 | hrtimer_set_expires(&t.timer, spin_until); | 2112 | hrtimer_set_expires(&t.timer, spin_until); |
2113 | 2113 | ||
2114 | remaining = ktime_to_us(hrtimer_expires_remaining(&t.timer)); | 2114 | remaining = ktime_to_us(hrtimer_expires_remaining(&t.timer)); |
2115 | if (remaining <= 0) | 2115 | if (remaining <= 0) { |
2116 | pkt_dev->next_tx = ktime_add_ns(spin_until, pkt_dev->delay); | ||
2116 | return; | 2117 | return; |
2118 | } | ||
2117 | 2119 | ||
2118 | start_time = ktime_now(); | 2120 | start_time = ktime_now(); |
2119 | if (remaining < 100) | 2121 | if (remaining < 100) |