[EXT] [PATCH 27/36] net/octeontx: fix Rx and Tx queue state

Harman Kalra hkalra at marvell.com
Thu Nov 2 10:59:02 CET 2023


Hi Jie,

What issue did you observe which the following patch resolves? Can you please provide steps.
Because we are setting the respective queue state in octeontx_dev_tx_queue_start/stop() ethdev_ops

Thanks
Harman

> -----Original Message-----
> From: Jie Hai <haijie1 at huawei.com>
> Sent: Friday, September 8, 2023 4:59 PM
> To: dev at dpdk.org; Harman Kalra <hkalra at marvell.com>; Chengwen Feng
> <fengchengwen at huawei.com>; Lijun Ou <oulijun at huawei.com>; Thomas
> Monjalon <thomas at monjalon.net>; Ferruh Yigit <ferruh.yigit at intel.com>;
> Konstantin Ananyev
> <"konstantin.v.ananyev at yandex.rukonstantin.ananyev"@huawei.com>
> Cc: haijie1 at huawei.com; lihuisong at huawei.com
> Subject: [EXT] [PATCH 27/36] net/octeontx: fix Rx and Tx queue state
> 
> External Email
> 
> ----------------------------------------------------------------------
> The DPDK framework reports the queue state, which is stored in
> dev->data->tx_queue_state and dev->data->rx_queue_state. The
> state is maintained by the driver. Users may determine whether a queue
> participates in packet forwarding based on the state.
> Therefore, the driver needs to modify the queue state in time according to
> the actual situation.
> 
> Fixes: 9ad9ff476cac ("ethdev: add queue state in queried queue
> information")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Jie Hai <haijie1 at huawei.com>
> ---
>  drivers/net/octeontx/octeontx_ethdev.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/net/octeontx/octeontx_ethdev.c
> b/drivers/net/octeontx/octeontx_ethdev.c
> index a6ae51a42c4e..2a8378a33ea2 100644
> --- a/drivers/net/octeontx/octeontx_ethdev.c
> +++ b/drivers/net/octeontx/octeontx_ethdev.c
> @@ -732,6 +732,11 @@ octeontx_dev_start(struct rte_eth_dev *dev)
>  	}
> 
>  	/* Success */
> +	for (i = 0; i < dev->data->nb_rx_queues; i++)
> +		dev->data->rx_queue_state[i] =
> RTE_ETH_QUEUE_STATE_STARTED;
> +	for (i = 0; i < dev->data->nb_tx_queues; i++)
> +		dev->data->tx_queue_state[i] =
> RTE_ETH_QUEUE_STATE_STARTED;
> +
>  	return ret;
> 
>  pki_port_stop_error:
> @@ -746,6 +751,7 @@ static int
>  octeontx_dev_stop(struct rte_eth_dev *dev)  {
>  	struct octeontx_nic *nic = octeontx_pmd_priv(dev);
> +	uint16_t i;
>  	int ret;
> 
>  	PMD_INIT_FUNC_TRACE();
> @@ -772,6 +778,11 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
>  		return ret;
>  	}
> 
> +	for (i = 0; i < dev->data->nb_rx_queues; i++)
> +		dev->data->rx_queue_state[i] =
> RTE_ETH_QUEUE_STATE_STOPPED;
> +	for (i = 0; i < dev->data->nb_tx_queues; i++)
> +		dev->data->tx_queue_state[i] =
> RTE_ETH_QUEUE_STATE_STOPPED;
> +
>  	return 0;
>  }
> 
> --
> 2.30.0



More information about the dev mailing list