Skip to content

Commit

Permalink
net/bnxt: fix Tx queue startup state
Browse files Browse the repository at this point in the history
[ upstream commit 0f22fe1 ]

Default queue state of Tx queues on startup is not correct.
Fix this by setting the state when the port is started.

Fixes: 6eb3cc2 ("net/bnxt: add initial Tx code")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
  • Loading branch information
ajitkhaparde authored and cpaelzer committed Nov 30, 2021
1 parent 9d66112 commit fdfed7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 10 additions & 0 deletions drivers/net/bnxt/bnxt_ethdev.c
Expand Up @@ -444,6 +444,16 @@ static int bnxt_init_chip(struct bnxt *bp)
goto err_out;
}

for (j = 0; j < bp->tx_nr_rings; j++) {
struct bnxt_tx_queue *txq = bp->tx_queues[j];

if (!txq->tx_deferred_start) {
bp->eth_dev->data->tx_queue_state[j] =
RTE_ETH_QUEUE_STATE_STARTED;
txq->tx_started = true;
}
}

rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);
if (rc) {
PMD_DRV_LOG(ERR,
Expand Down
5 changes: 0 additions & 5 deletions drivers/net/bnxt/bnxt_txq.c
Expand Up @@ -160,11 +160,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,

eth_dev->data->tx_queues[queue_idx] = txq;

if (txq->tx_deferred_start)
txq->tx_started = false;
else
txq->tx_started = true;

return 0;
err:
bnxt_tx_queue_release_op(txq);
Expand Down

0 comments on commit fdfed7e

Please sign in to comment.