Skip to contentSkip to conversation

net/bnxt: fix Tx queue startup state

PATCH In review Ajit Khaparde 1 participant 2 messages Sep 25, 2021 – Sep 26, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix Tx queue startup state

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

Fixes 6eb3cc2294fd ("net/bnxt: add initial Tx code")
---
 drivers/net/bnxt/bnxt_ethdev.c | 10 ++++++++++
 drivers/net/bnxt/bnxt_txq.c    |  5 -----
 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +10 -0
index 097dd10de9..eb9147927e 100644
@@ -814,6 +814,16 @@ static int bnxt_start_nic(struct bnxt *bp)
 		}
 	}
 
+	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,
drivers/net/bnxt/bnxt_txq.c +0 -5
index 830416af3d..3ffc334cff 100644
@@ -166,11 +166,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);
Signature · 1 line
2.30.1 (Apple Git-130)
#1 lore raw
Quoted 9 lines · Ajit Khaparde

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

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

Patch applied to dpdk-next-net-brcm. Thanks

Quoted 45 lines
---
 drivers/net/bnxt/bnxt_ethdev.c | 10 ++++++++++
 drivers/net/bnxt/bnxt_txq.c    |  5 -----
 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +10 -0
index 097dd10de9..eb9147927e 100644
@@ -814,6 +814,16 @@ static int bnxt_start_nic(struct bnxt *bp)
                }
        }
 
+       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,
drivers/net/bnxt/bnxt_txq.c +0 -6
index 830416af3d..3ffc334cff 100644
@@ -166,11 +166,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);
--

2.30.1 (Apple Git-130)