int start_grp_id, end_grp_id = 1, rc = 0;
struct bnxt_vnic_info *vnic;
struct bnxt_filter_info *filter;
- enum rte_eth_nb_pools pools = bp->rx_cp_nr_rings, max_pools = 0;
+ enum rte_eth_nb_pools pools = 1, max_pools = 0;
struct bnxt_rx_queue *rxq;
bp->nr_vnics = 0;
rc = -EINVAL;
goto err_out;
}
+ } else if (!dev_conf->rxmode.mq_mode) {
+ pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : pools;
}
+
+ pools = RTE_MIN(pools, bp->rx_cp_nr_rings);
nb_q_per_grp = bp->rx_cp_nr_rings / pools;
bp->rx_num_qs_per_vnic = nb_q_per_grp;
PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n",
if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
struct rte_eth_rss_conf *rss = &dev_conf->rx_adv_conf.rss_conf;
- if (bp->flags & BNXT_FLAG_UPDATE_HASH) {
- rss = &bp->rss_conf;
+ if (bp->flags & BNXT_FLAG_UPDATE_HASH)
bp->flags &= ~BNXT_FLAG_UPDATE_HASH;
- }
for (i = 0; i < bp->nr_vnics; i++) {
vnic = &bp->vnic_info[i];
if (rc)
return rc;
- if (queue_idx >= bp->max_rx_rings) {
+ if (queue_idx >= BNXT_MAX_RINGS(bp)) {
PMD_DRV_LOG(ERR,
"Cannot create Rx ring %d. Only %d rings available\n",
queue_idx, bp->max_rx_rings);
}
rxq = bp->rx_queues[rx_queue_id];
- vnic = rxq->vnic;
-
- if (!rxq || !vnic) {
+ if (!rxq) {
PMD_DRV_LOG(ERR, "Invalid Rx queue %d\n", rx_queue_id);
return -EINVAL;
}
+ vnic = rxq->vnic;
+ if (!vnic) {
+ PMD_DRV_LOG(ERR, "VNIC not initialized for RxQ %d\n",
+ rx_queue_id);
+ return -EINVAL;
+ }
+
dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
rxq->rx_started = false;
PMD_DRV_LOG(DEBUG, "Rx queue stopped\n");