app/testpmd: add flowgen forwarding engine
[dpdk.git] / app / test-pmd / testpmd.c
index 55a5ea1..5b3781a 100644 (file)
@@ -83,6 +83,7 @@ uint16_t verbose_level = 0; /**< Silent by default. */
 
 /* use master core for command line ? */
 uint8_t interactive = 0;
+uint8_t auto_start = 0;
 
 /*
  * NUMA support configuration.
@@ -144,6 +145,8 @@ struct fwd_engine * fwd_engines[] = {
        &io_fwd_engine,
        &mac_fwd_engine,
        &mac_retry_fwd_engine,
+       &mac_swap_engine,
+       &flow_gen_engine,
        &rx_only_engine,
        &tx_only_engine,
        &csum_fwd_engine,
@@ -1830,9 +1833,13 @@ main(int argc, char** argv)
                rte_eth_promiscuous_enable(port_id);
 
 #ifdef RTE_LIBRTE_CMDLINE
-       if (interactive == 1)
+       if (interactive == 1) {
+               if (auto_start) {
+                       printf("Start automatic packet forwarding\n");
+                       start_packet_forwarding(0);
+               }
                prompt();
-       else
+       else
 #endif
        {
                char c;