return NULL;
#endif
/* check input parameters */
- if (port_id >= nb_ports || fn == NULL ||
+ if (!rte_eth_dev_is_valid_port(port_id) || fn == NULL ||
queue_id >= rte_eth_devices[port_id].data->nb_rx_queues) {
rte_errno = EINVAL;
return NULL;
return NULL;
#endif
/* check input parameters */
- if (port_id >= nb_ports || fn == NULL ||
+ if (!rte_eth_dev_is_valid_port(port_id) || fn == NULL ||
queue_id >= rte_eth_devices[port_id].data->nb_tx_queues) {
rte_errno = EINVAL;
return NULL;
return (-ENOTSUP);
#endif
/* Check input parameters. */
- if (port_id >= nb_ports || user_cb == NULL ||
+ if (!rte_eth_dev_is_valid_port(port_id) || user_cb == NULL ||
queue_id >= rte_eth_devices[port_id].data->nb_rx_queues) {
return (-EINVAL);
}
return (-ENOTSUP);
#endif
/* Check input parameters. */
- if (port_id >= nb_ports || user_cb == NULL ||
+ if (!rte_eth_dev_is_valid_port(port_id) || user_cb == NULL ||
queue_id >= rte_eth_devices[port_id].data->nb_tx_queues) {
return (-EINVAL);
}