From: Bernard Iremonger <bernard.iremonger@intel.com>
To: dev@dpdk.org, jingjing.wu@intel.com
Cc: Bernard Iremonger <bernard.iremonger@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v6 2/2] app/testpmd: fix port stop
Date: Fri, 27 Jan 2017 10:50:00 +0000 [thread overview]
Message-ID: <1485514200-25230-3-git-send-email-bernard.iremonger@intel.com> (raw)
In-Reply-To: <1485354963-17326-1-git-send-email-bernard.iremonger@intel.com>
The rte_eth_dev_stop function is not called if the port_status is
not RTE_PORT_STARTED. This can happen if the rte_eth_dev_start
function is called directly, ie not through the start_port function.
Make sure rte_eth_dev_stop is always called in stop_port function.
Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
CC: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
app/test-pmd/testpmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 3d25436..0d7a4d4 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1490,13 +1490,13 @@ stop_port(portid_t pid)
continue;
}
+ rte_eth_dev_stop(pi);
+
port = &ports[pi];
if (rte_atomic16_cmpset(&(port->port_status), RTE_PORT_STARTED,
RTE_PORT_HANDLING) == 0)
continue;
- rte_eth_dev_stop(pi);
-
if (rte_atomic16_cmpset(&(port->port_status),
RTE_PORT_HANDLING, RTE_PORT_STOPPED) == 0)
printf("Port %d can not be set into stopped\n", pi);
--
2.10.1
next parent reply other threads:[~2017-01-27 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1485354963-17326-1-git-send-email-bernard.iremonger@intel.com>
2017-01-27 10:50 ` Bernard Iremonger [this message]
2017-02-03 8:21 ` Wu, Jingjing
2017-02-03 10:37 ` Iremonger, Bernard
2017-02-12 4:34 ` Wu, Jingjing
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=1485514200-25230-3-git-send-email-bernard.iremonger@intel.com \
--to=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
/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).