return -EINVAL;
}
- if (dev->data->rx_queues[queue_id] == NULL) {
+ 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",
return -EINVAL;
}
- if (dev->data->tx_queues[queue_id] == NULL) {
+ if (dev->data->tx_queues == NULL ||
+ dev->data->tx_queues[queue_id] == NULL) {
RTE_ETHDEV_LOG(ERR,
"Tx queue %"PRIu16" of device with port_id=%"
PRIu16" has not been setup\n",