[PATCH v11 1/4] ethdev: add API for mbufs recycle mode
Stephen Hemminger
stephen at networkplumber.org
Tue Aug 22 16:02:43 CEST 2023
On Tue, 22 Aug 2023 15:27:07 +0800
Feifei Wang <feifei.wang2 at arm.com> wrote:
> + if (queue_id >= dev->data->nb_rx_queues) {
> + RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u\n", queue_id);
> + return -EINVAL;
> + }
> +
> + if (dev->data->rx_queues == NULL ||
> + dev->data->rx_queues[queue_id] == NULL) {
> + RTE_ETHDEV_LOG(ERR,
> + "Rx queue %"PRIu16" of device with port_id=%"
> + PRIu16" has not been setup\n",
> + queue_id, port_id);
> + return -EINVAL;
> + }
This could be changed to something like:
ret = eth_dev_validate_rx_queue(dev, queue_id);
if (unlikely(ret != 0))
return ret;
More information about the dev
mailing list