app/testpmd: fix exit without freeing resources
authorJiayu Hu <jiayu.hu@intel.com>
Fri, 28 Apr 2017 01:32:50 +0000 (09:32 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 1 May 2017 13:40:08 +0000 (15:40 +0200)
When testpmd exits, it frees the acquired resources (e.g. stop ports).
However, when we terminate it by Ctrl-d, testpmd exits directly without
releasing the resources. In this patch, we fix this exit issue.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
app/test-pmd/testpmd.c

index 0c6a50e..36a4701 100644 (file)
@@ -2278,6 +2278,7 @@ main(int argc, char** argv)
                        start_packet_forwarding(0);
                }
                prompt();
+               pmd_test_exit();
        } else
 #endif
        {