> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Tuesday, August 22, 2023 10:03 PM
> To: Feifei Wang <[email protected]>
> Cc: [email protected]; Ferruh Yigit <[email protected]>; Andrew
> Rybchenko <[email protected]>; [email protected]; nd
> <[email protected]>; Honnappa Nagarahalli <[email protected]>;
> Ruifeng Wang <[email protected]>; Morten Brørup
> <[email protected]>
> Subject: Re: [PATCH v11 1/4] ethdev: add API for mbufs recycle mode
>
> On Tue, 22 Aug 2023 15:27:07 +0800
> Feifei Wang <[email protected]> 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;
>
Good comments, I just know there is an API to check these. Thanks.
>
>