* [dpdk-stable] [PATCH] ethdev: fix queue start
@ 2018-03-22 12:59 Qi Zhang
2018-03-24 12:06 ` Ananyev, Konstantin
0 siblings, 1 reply; 3+ messages in thread
From: Qi Zhang @ 2018-03-22 12:59 UTC (permalink / raw)
To: thomas; +Cc: konstantin.ananyev, dev, Qi Zhang, stable
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;
--
2.13.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH] ethdev: fix queue start
2018-03-22 12:59 [dpdk-stable] [PATCH] ethdev: fix queue start Qi Zhang
@ 2018-03-24 12:06 ` Ananyev, Konstantin
2018-03-27 19:10 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Ananyev, Konstantin @ 2018-03-24 12:06 UTC (permalink / raw)
To: Zhang, Qi Z, thomas; +Cc: dev, stable
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH] ethdev: fix queue start
2018-03-24 12:06 ` Ananyev, Konstantin
@ 2018-03-27 19:10 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-03-27 19:10 UTC (permalink / raw)
To: Ananyev, Konstantin, Zhang, Qi Z, thomas; +Cc: dev, stable
On 3/24/2018 12:06 PM, Ananyev, Konstantin wrote:
>
>
>>
>> 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>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-27 19:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-22 12:59 [dpdk-stable] [PATCH] ethdev: fix queue start Qi Zhang
2018-03-24 12:06 ` Ananyev, Konstantin
2018-03-27 19:10 ` Ferruh Yigit
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).