Skip to contentSkip to conversation

net/bnxt: fix Rx queue startup state

PATCH In review Lance Richardson 2 participants 2 messages Sep 14, 2021 – Sep 15, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

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

Since the addition of support for runtime queue setup, receive queues that are started by default no longer have the correct state. Fix this by setting the state when a port is started.

Fixes 0105ea1296c9 ("net/bnxt: support runtime queue setup")
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/bnxt/bnxt_ethdev.c +6 -0
index d6e3847963..097dd10de9 100644
@@ -482,6 +482,12 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 			rxq->vnic->fw_grp_ids[j] = INVALID_HW_RING_ID;
 		else
 			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);
Signature · 1 line
2.25.1
#1 lore raw
Quoted 11 lines · Lance Richardson

Since the addition of support for runtime queue setup, receive queues that are started by default no longer have the correct state. Fix this by setting the state when a port is started.

Fixes 0105ea1296c9 ("net/bnxt: support runtime queue setup")

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

Quoted 24 lines
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/bnxt/bnxt_ethdev.c +6 -1
index d6e3847963..097dd10de9 100644
@@ -482,6 +482,12 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
                        rxq->vnic->fw_grp_ids[j] = INVALID_HW_RING_ID;
                else
                        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);
--

2.25.1