From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>,
"thomas@monjalon.net" <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] ethdev: fix queue start
Date: Sat, 24 Mar 2018 12:06:55 +0000 [thread overview]
Message-ID: <2601191342CEEE43887BDE71AB977258A0AB3C78@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <20180322125901.37141-1-qi.z.zhang@intel.com>
>
> Device must be started before start any queue.
>
> Fixes: 0748be2cf9a2 ("ethdev: queue start and stop")
> Cc: stable@dpdk.org
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> lib/librte_ether/rte_ethdev.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
> index 0590f0c10..7aa404fa5 100644
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -732,6 +732,12 @@ 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;
> @@ -785,6 +791,12 @@ 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;
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.13.6
next prev parent reply other threads:[~2018-03-24 12:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 12:59 Qi Zhang
2018-03-24 12:06 ` Ananyev, Konstantin [this message]
2018-03-27 19:10 ` Ferruh Yigit
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=2601191342CEEE43887BDE71AB977258A0AB3C78@irsmsx105.ger.corp.intel.com \
--to=konstantin.ananyev@intel.com \
--cc=dev@dpdk.org \
--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).