Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166706
b: refs/heads/master
c: 417bc4b
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 1, 2009
1 parent 5f14591 commit a7587f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a00d2102ce01df5f0a8892814ecd26d130d47e7d
refs/heads/master: 417bc4b855f04dd4ad27a7cabe3e7996a7b78ddb
6 changes: 4 additions & 2 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2105,15 +2105,17 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until)
{
ktime_t start_time, end_time;
s32 remaining;
s64 remaining;
struct hrtimer_sleeper t;

hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
hrtimer_set_expires(&t.timer, spin_until);

remaining = ktime_to_us(hrtimer_expires_remaining(&t.timer));
if (remaining <= 0)
if (remaining <= 0) {
pkt_dev->next_tx = ktime_add_ns(spin_until, pkt_dev->delay);
return;
}

start_time = ktime_now();
if (remaining < 100)
Expand Down

0 comments on commit a7587f1

Please sign in to comment.