net/bnxt: fix Rx queue state on start

Fix Rx queue state on device start.
The state of Rx queues could be incorrect in some cases
because instead of updating the state for all the Rx queues,
we are updating it for queues in a VNIC.

Fixes: 0105ea1296 ("net/bnxt: support runtime queue setup")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
This commit is contained in:
Ajit Khaparde 2021-10-04 21:05:23 -07:00
parent 657c2a7f1d
commit 6132d35512

View File

@ -482,12 +482,6 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
rxq->vnic->fw_grp_ids[j] = INVALID_HW_RING_ID; rxq->vnic->fw_grp_ids[j] = INVALID_HW_RING_ID;
else else
vnic->rx_queue_cnt++; vnic->rx_queue_cnt++;
if (!rxq->rx_deferred_start) {
bp->eth_dev->data->rx_queue_state[j] =
RTE_ETH_QUEUE_STATE_STARTED;
rxq->rx_started = true;
}
} }
PMD_DRV_LOG(DEBUG, "vnic->rx_queue_cnt = %d\n", vnic->rx_queue_cnt); PMD_DRV_LOG(DEBUG, "vnic->rx_queue_cnt = %d\n", vnic->rx_queue_cnt);
@ -824,6 +818,16 @@ static int bnxt_start_nic(struct bnxt *bp)
} }
} }
for (j = 0; j < bp->rx_nr_rings; j++) {
struct bnxt_rx_queue *rxq = bp->rx_queues[j];
if (!rxq->rx_deferred_start) {
bp->eth_dev->data->rx_queue_state[j] =
RTE_ETH_QUEUE_STATE_STARTED;
rxq->rx_started = true;
}
}
rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL); rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);
if (rc) { if (rc) {
PMD_DRV_LOG(ERR, PMD_DRV_LOG(ERR,