Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177542735
D30266.1794673090.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
623 B
Referenced Files
None
Subscribers
None
D30266.1794673090.diff
View Options
Index: tools/tools/netmap/pkt-gen.c
===================================================================
--- tools/tools/netmap/pkt-gen.c
+++ tools/tools/netmap/pkt-gen.c
@@ -1816,6 +1816,7 @@
struct netmap_ring *rxring;
int i;
struct my_ctrs cur;
+ uint64_t n = targ->g->npackets / targ->g->nthreads;
memset(&cur, 0, sizeof(cur));
@@ -1866,7 +1867,7 @@
int dump = targ->g->options & OPT_DUMP;
nifp = targ->nmd->nifp;
- while (!targ->cancel) {
+ while (!targ->cancel && (n == 0 || cur.pkts < n)) {
/* Once we started to receive packets, wait at most 1 seconds
before quitting. */
#ifdef BUSYWAIT
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 4:18 PM (10 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41727361
Default Alt Text
D30266.1794673090.diff (623 B)
Attached To
Mode
D30266: pkt-gen: Allow limiting received packets
Attached
Detach File
Event Timeline