net/bnxt: fix using RSS config struct
[dpdk.git] / drivers / net / bnxt / bnxt_rxq.c
index 7db7254..e42308a 100644 (file)
@@ -168,10 +168,8 @@ out:
        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];
@@ -516,13 +514,18 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
        }
 
        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");