On Tue, 3 Nov 2015 12:00:59 +0000 Bruce Richardson <bruce.richardson at intel.com> wrote:
> * @return > - * The number of used descriptors in the specific queue. > + * The number of used descriptors in the specific queue, or: > + * (-EINVAL) if *port_id* is invalid > + * (-ENOTSUP) if the device does not support this function > */ > -static inline uint32_t > +static inline int > rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id) > { > struct rte_eth_dev *dev = &rte_eth_devices[port_id]; > #ifdef RTE_LIBRTE_ETHDEV_DEBUG > - RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); > - RTE_ETH_FPTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, 0); > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL); > #endif I think it should always check validity of portid/queueid the check is very brief.