From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 3AB242B91 for ; Fri, 8 Mar 2019 18:48:58 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2019 19:48:57 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x28HloAt002625; Fri, 8 Mar 2019 19:48:56 +0200 From: Yongseok Koh To: Cristian Dumitrescu Cc: Bernard Iremonger , dpdk stable Date: Fri, 8 Mar 2019 09:47:17 -0800 Message-Id: <20190308174749.30771-39-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190308174749.30771-1-yskoh@mellanox.com> References: <20190308174749.30771-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'app/testpmd: fix quit to stop all ports before close' has been queued to LTS release 17.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 17:48:58 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 03/13/19. So please shout if anyone has objection. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From bd17e67a250440429cf289513c2fa048f3bd47a7 Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Fri, 4 Jan 2019 12:28:33 +0000 Subject: [PATCH] app/testpmd: fix quit to stop all ports before close [ upstream commit 08fd782b8454ab9019290d35f4e5334b4235923e ] 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") Signed-off-by: Cristian Dumitrescu Acked-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 0adebddc8..2d9ca04df 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1965,9 +1965,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); } } -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-08 09:46:42.206967683 -0800 +++ 0039-app-testpmd-fix-quit-to-stop-all-ports-before-close.patch 2019-03-08 09:46:40.183400000 -0800 @@ -1,8 +1,10 @@ -From 08fd782b8454ab9019290d35f4e5334b4235923e Mon Sep 17 00:00:00 2001 +From bd17e67a250440429cf289513c2fa048f3bd47a7 Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Fri, 4 Jan 2019 12:28:33 +0000 Subject: [PATCH] app/testpmd: fix quit to stop all ports before close +[ upstream commit 08fd782b8454ab9019290d35f4e5334b4235923e ] + 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 @@ -19,7 +21,6 @@ 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 Acked-by: Bernard Iremonger @@ -28,10 +29,10 @@ 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c -index 8d584b008..15a948828 100644 +index 0adebddc8..2d9ca04df 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c -@@ -2391,9 +2391,13 @@ pmd_test_exit(void) +@@ -1965,9 +1965,13 @@ pmd_test_exit(void) if (ports != NULL) { no_link_check = 1; RTE_ETH_FOREACH_DEV(pt_id) { @@ -44,8 +45,8 @@ + printf("\nShutting down port %d...\n", pt_id); + fflush(stdout); close_port(pt_id); - - /* + } + } -- 2.11.0