From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Cc: wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com
Subject: [dpdk-dev] [PATCH] app/test-pmd: stop all ports before any close
Date: Thu, 3 Jan 2019 16:37:05 +0000 [thread overview]
Message-ID: <20190103163705.45497-1-cristian.dumitrescu@intel.com> (raw)
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 stoping 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.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
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 8d584b008..15a948828 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);
/*
--
2.17.1
next reply other threads:[~2019-01-03 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 16:37 Cristian Dumitrescu [this message]
2019-01-04 10:16 ` Iremonger, Bernard
2019-01-04 11:17 ` Dumitrescu, Cristian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190103163705.45497-1-cristian.dumitrescu@intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).