aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/pg/pg.h
diff options
context:
space:
mode:
authorChristian E. Hopps <chopps@chopps.org>2019-09-27 12:59:30 -0400
committerDave Barach <openvpp@barachs.net>2019-10-03 16:54:28 +0000
commit87d7bac5cf2ebdc7820e1edaadc2cc3b6d111cf2 (patch)
treeeafd0c6385923294367a0db2a565cb1b9a18ae32 /src/vnet/pg/pg.h
parent4ec6f6bc7788f3c356a022ea5fd019ca4e815747 (diff)
misc: add "maxframe" and "rate" to packet-generator cli.
Allow for setting the maximum number of generated packets to be included in the frame passed to next nodes. This is very important for testing code which may be susceptible to multi-frame vs single-frame bugs (e.g., code that is doing re-ordering where packets may be buffered between frames). Update: - remove redundant packet "rate" option. - reduce n_max_frame to u32 as that's what pulled from the CLI. Type: feature Signed-off-by: Christian E. Hopps <chopps@chopps.org> Change-Id: Ie362bbb110b2cf01d9f65c559bbe9101e17b7fdc Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'src/vnet/pg/pg.h')
-rw-r--r--src/vnet/pg/pg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/pg/pg.h b/src/vnet/pg/pg.h
index aef7a5bbf71..c73634f3125 100644
--- a/src/vnet/pg/pg.h
+++ b/src/vnet/pg/pg.h
@@ -155,6 +155,9 @@ typedef struct pg_stream_t
Zero means no packet limit. */
u64 n_packets_limit;
+ /* Only generate up to n_max_frame per frame. */
+ u32 n_max_frame;
+
/* Rate for this stream in packets/second.
Zero means unlimited rate. */
f64 rate_packets_per_second;