summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>2019-01-04 12:28:33 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-01-14 17:44:29 +0100
commit08fd782b8454ab9019290d35f4e5334b4235923e (patch)
tree3b40fd2b7be4cb32f12eaea38b0ff9d43e8b92bd /app
parent132a08b5879e4633f5a800c1774b36c26b72c5f3 (diff)
downloaddpdk-next-eventdev-08fd782b8454ab9019290d35f4e5334b4235923e.zip
dpdk-next-eventdev-08fd782b8454ab9019290d35f4e5334b4235923e.tar.gz
dpdk-next-eventdev-08fd782b8454ab9019290d35f4e5334b4235923e.tar.xz
app/testpmd: fix quit to stop all ports before close
This patch proposes a slightly different test-pmd quit operation: stop all devices before starting to close any device. Basically, stop all moving parts before beginning to remove them. The current test-pmd quit is stopping and closing each device before moving to the next device. If all devices in the system are independent of each other, this difference is usually not important. In case of Soft NIC devices, any such virtual device typically depends on one or more physical devices being alive, as it accesses their queues, so this difference becomes important. Without this straightforward fix, all the Soft NIC devices need to be manually stopped before the quit command is issued, otherwise the quit command can sometimes crash the test-pmd application. Fixes: d3a274ce9dee ("app/testpmd: handle SIGINT and SIGTERM") Cc: stable@dpdk.org Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-pmd/testpmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8d584b0..15a9488 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2391,9 +2391,13 @@ pmd_test_exit(void)
if (ports != NULL) {
no_link_check = 1;
RTE_ETH_FOREACH_DEV(pt_id) {
- printf("\nShutting down port %d...\n", pt_id);
+ printf("\nStopping port %d...\n", pt_id);
fflush(stdout);
stop_port(pt_id);
+ }
+ RTE_ETH_FOREACH_DEV(pt_id) {
+ printf("\nShutting down port %d...\n", pt_id);
+ fflush(stdout);
close_port(pt_id);
/*