From: Yongseok Koh <yskoh@mellanox.com>
To: thomas@monjalon.net
Cc: stable@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
Konstantin Ananyev <konstantin.ananyev@intel.com>
Subject: [dpdk-stable] [prefix=PATCH 17.11] ethdev: fix queue start and stop
Date: Fri, 14 Dec 2018 14:20:43 -0800 [thread overview]
Message-ID: <20181214222043.7394-1-yskoh@mellanox.com> (raw)
This patch reverts
commit d48890a39af7 ("ethdev: fix queue start")
as the corresponding upstream commit was incorrectly applied.
The upstream commit is re-applied correctly.
commit 239c9b435ad4 ("ethdev: fix queue start")
Fixes: 0748be2cf9a2 ("ethdev: queue start and stop")
Fixes: d48890a39af7 ("ethdev: fix queue start")
Cc: Qi Zhang <qi.z.zhang@intel.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reported-by: Qi Zhang <qi.z.zhang@intel.com>
---
lib/librte_ether/rte_ethdev.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index eea11d066..096b35faf 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -507,6 +507,13 @@ rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
dev = &rte_eth_devices[port_id];
+ if (!dev->data->dev_started) {
+ RTE_PMD_DEBUG_TRACE(
+ "port %d must be started before start any queue\n",
+ port_id);
+ return -EINVAL;
+ }
+
if (rx_queue_id >= dev->data->nb_rx_queues) {
RTE_PMD_DEBUG_TRACE("Invalid RX queue_id=%d\n", rx_queue_id);
return -EINVAL;
@@ -533,12 +540,6 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
dev = &rte_eth_devices[port_id];
- if (!dev->data->dev_started) {
- RTE_PMD_DEBUG_TRACE(
- "port %d must be started before start any queue\n", port_id);
- return -EINVAL;
- }
-
if (rx_queue_id >= dev->data->nb_rx_queues) {
RTE_PMD_DEBUG_TRACE("Invalid RX queue_id=%d\n", rx_queue_id);
return -EINVAL;
@@ -565,6 +566,13 @@ rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
dev = &rte_eth_devices[port_id];
+ if (!dev->data->dev_started) {
+ RTE_PMD_DEBUG_TRACE(
+ "port %d must be started before start any queue\n",
+ port_id);
+ return -EINVAL;
+ }
+
if (tx_queue_id >= dev->data->nb_tx_queues) {
RTE_PMD_DEBUG_TRACE("Invalid TX queue_id=%d\n", tx_queue_id);
return -EINVAL;
@@ -591,12 +599,6 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
dev = &rte_eth_devices[port_id];
- if (!dev->data->dev_started) {
- RTE_PMD_DEBUG_TRACE(
- "port %d must be started before start any queue\n", port_id);
- return -EINVAL;
- }
-
if (tx_queue_id >= dev->data->nb_tx_queues) {
RTE_PMD_DEBUG_TRACE("Invalid TX queue_id=%d\n", tx_queue_id);
return -EINVAL;
--
2.11.0
next reply other threads:[~2018-12-14 22:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 22:20 Yongseok Koh [this message]
2018-12-15 0:07 ` Luca Boccassi
2018-12-17 10:07 ` Kevin Traynor
2018-12-19 11:04 ` Yongseok Koh
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=20181214222043.7394-1-yskoh@mellanox.com \
--to=yskoh@mellanox.com \
--cc=konstantin.ananyev@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).