Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107766
b: refs/heads/master
c: 1211a64
h: refs/heads/master
v: v3
  • Loading branch information
Robert Olsson authored and David S. Miller committed Aug 6, 2008
1 parent 53f5aaa commit a73c425
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: ef647f1300d69adb8223d970554d59d7e244db6d
refs/heads/master: 1211a64554065316e02b3c62b320088ad4f63260
6 changes: 5 additions & 1 deletion trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2085,15 +2085,19 @@ static inline int f_pick(struct pktgen_dev *pkt_dev)
if (pkt_dev->flows[flow].count >= pkt_dev->lflow) {
/* reset time */
pkt_dev->flows[flow].count = 0;
pkt_dev->flows[flow].flags = 0;
pkt_dev->curfl += 1;
if (pkt_dev->curfl >= pkt_dev->cflows)
pkt_dev->curfl = 0; /*reset */
}
} else {
flow = random32() % pkt_dev->cflows;
pkt_dev->curfl = flow;

if (pkt_dev->flows[flow].count > pkt_dev->lflow)
if (pkt_dev->flows[flow].count > pkt_dev->lflow) {
pkt_dev->flows[flow].count = 0;
pkt_dev->flows[flow].flags = 0;
}
}

return pkt_dev->curfl;
Expand Down

0 comments on commit a73c425

Please sign in to comment.