net/bnxt: reset Rx allocation state on port restart
authorLance Richardson <lance.richardson@broadcom.com>
Wed, 17 Jul 2019 10:41:29 +0000 (16:11 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:35 +0000 (14:31 +0200)
Move call site of bnxt_rxq_vec_setup() to ensure that rxq->rxrearm_nb
and rxq->rxrearm_start are reinitialized correctly when a port is
restarted.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Christopher Reder <christopher.reder@broadcom.com>
drivers/net/bnxt/bnxt_ring.c
drivers/net/bnxt/bnxt_rxq.c

index 16327db..7453d4b 100644 (file)
@@ -613,6 +613,9 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
                bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
                bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
                rxq->index = i;
+#ifdef RTE_ARCH_X86
+               bnxt_rxq_vec_setup(rxq);
+#endif
        }
 
        for (i = 0; i < bp->tx_cp_nr_rings; i++) {
index 6919acb..c94cac5 100644 (file)
@@ -356,10 +356,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
        eth_dev->data->rx_queue_state[queue_idx] = queue_state;
        rte_spinlock_init(&rxq->lock);
 
-#ifdef RTE_ARCH_X86
-       bnxt_rxq_vec_setup(rxq);
-#endif
-
 out:
        return rc;
 }