[PATCH v7 05/21] net/cpfl: support queue start

Ferruh Yigit ferruh.yigit at amd.com
Mon Feb 27 22:47:03 CET 2023


On 2/16/2023 12:29 AM, Mingxia Liu wrote:
> Add support for these device ops:
>  - rx_queue_start
>  - tx_queue_start
> 
> Signed-off-by: Mingxia Liu <mingxia.liu at intel.com>

<...>

> +int
> +cpfl_rx_queue_init(struct rte_eth_dev *dev, uint16_t rx_queue_id)
> +{
> +	struct idpf_rx_queue *rxq;
> +	int err;
> +
> +	if (rx_queue_id >= dev->data->nb_rx_queues)
> +		return -EINVAL;
> +
> +	rxq = dev->data->rx_queues[rx_queue_id];
> +
> +	if (rxq == NULL || !rxq->q_set) {
> +		PMD_DRV_LOG(ERR, "RX queue %u not available or setup",
> +					rx_queue_id);
> +		return -EINVAL;
> +	}
> +
> +	if (rxq->bufq1 == NULL) {
> +		/* Single queue */

What do you think to keep the queue type explicitly in the queue struct,
instead of deducing it from pointer values?




More information about the dev mailing list