app/testpmd: stop forwarding when quitting
[dpdk.git] / app / test-pmd / testpmd.c
index 3e1327e..4828354 100644 (file)
@@ -57,7 +57,6 @@
 #include <rte_memcpy.h>
 #include <rte_memzone.h>
 #include <rte_launch.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_per_lcore.h>
 #include <rte_lcore.h>
@@ -1634,6 +1633,9 @@ pmd_test_exit(void)
 {
        portid_t pt_id;
 
+       if (test_done == 0)
+               stop_packet_forwarding();
+
        FOREACH_PORT(pt_id, ports) {
                printf("Stopping port %d...", pt_id);
                fflush(stdout);