[dpdk-dev] app/testpmd: terminate without freeing resources

Message ID 1493256770-15331-1-git-send-email-jiayu.hu@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Hu, Jiayu April 27, 2017, 1:32 a.m. UTC
  When testpmd exists, it frees the acquired resources (e.g. stop ports).
However, when we terminate it by Ctrl-d, testpmd exists directly without
releasing the resources. In this patch, we fix this exit issue.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
---
 app/test-pmd/testpmd.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 3a57348..94cefc0 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2289,6 +2289,7 @@  main(int argc, char** argv)
 			start_packet_forwarding(0);
 		}
 		prompt();
+		pmd_test_exit();
 	} else
 #endif
 	{