misc: add "maxframe" and "rate" to packet-generator cli.
[vpp.git] / src / vnet / pg / input.c
index bb760b0..c47dfe2 100644 (file)
@@ -1762,8 +1762,8 @@ pg_input_stream (vlib_node_runtime_t * node, pg_main_t * pg, pg_stream_t * s)
     n_packets = s->n_packets_limit - s->n_packets_generated;
 
   /* Generate up to one frame's worth of packets. */
-  if (n_packets > VLIB_FRAME_SIZE)
-    n_packets = VLIB_FRAME_SIZE;
+  if (n_packets > s->n_max_frame)
+    n_packets = s->n_max_frame;
 
   if (n_packets > 0)
     n_packets = pg_generate_packets (node, pg, s, n_packets);
@@ -1797,6 +1797,7 @@ pg_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
 /* *INDENT-OFF* */
 VLIB_REGISTER_NODE (pg_input_node) = {
   .function = pg_input,
+  .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED,
   .name = "pg-input",
   .sibling_of = "device-input",
   .type = VLIB_NODE_TYPE_INPUT,