[dpdk-stable] [prefix=PATCH 17.11] ethdev: fix queue start and stop

Yongseok Koh yskoh at mellanox.com
Wed Dec 19 12:04:55 CET 2018


> On Dec 14, 2018, at 2:20 PM, Yongseok Koh <yskoh at mellanox.com> wrote:
> 
> 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 at intel.com>
> Cc: Konstantin Ananyev <konstantin.ananyev at intel.com>
> 
> Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
> Reported-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
> Reported-by: Qi Zhang <qi.z.zhang at intel.com>
> ---

applied to stable/17.11

thanks,
yongseok

> 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
> 



More information about the stable mailing list