struct enic *enic = pmd_priv(eth_dev);
ENICPMD_FUNC_TRACE();
+ if (queue_idx >= ENIC_WQ_MAX) {
+ dev_err(enic,
+ "Max number of TX queues exceeded. Max is %d\n",
+ ENIC_WQ_MAX);
+ return -EINVAL;
+ }
+
eth_dev->data->tx_queues[queue_idx] = (void *)&enic->wq[queue_idx];
ret = enic_alloc_wq(enic, queue_idx, socket_id, nb_desc);
struct enic *enic = pmd_priv(eth_dev);
ENICPMD_FUNC_TRACE();
+ if (queue_idx >= ENIC_RQ_MAX) {
+ dev_err(enic,
+ "Max number of RX queues exceeded. Max is %d\n",
+ ENIC_RQ_MAX);
+ return -EINVAL;
+ }
+
eth_dev->data->rx_queues[queue_idx] = (void *)&enic->rq[queue_idx];
ret = enic_alloc_rq(enic, queue_idx, socket_id, mp, nb_desc);