From: Lance Richardson Date: Wed, 17 Jul 2019 10:41:29 +0000 (+0530) Subject: net/bnxt: reset Rx allocation state on port restart X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3672b93dc4901f7459bf0f449d9697f1736d34a5;p=dpdk.git net/bnxt: reset Rx allocation state on port restart 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 Signed-off-by: Ajit Khaparde Reviewed-by: Christopher Reder --- diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 16327dbe9b..7453d4b56b 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -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++) { diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 6919acbb4d..c94cac5a9c 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -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; }