Skip to contentSkip to conversation

net/iavf: fix rxdid configure

PATCH Applied Jeff Guo 3 participants 3 messages Nov 9, 2020 – Nov 10, 2020 Network drivers

lore
Share & tools
lore

Jeff Guo

author
#0 lore raw

PATCH 1/1 net/iavf: fix rxdid configure

When configure rx queue by virtchnnl, the rxdid should be configured only if the rx queue has been setting up.

Fixes 12b435bf8f2f ("net/iavf: support flex desc metadata extraction")
---
 drivers/net/iavf/iavf_vchnl.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/net/iavf/iavf_vchnl.c +11 -7
index 64d194670..33d03af65 100644
@@ -833,20 +833,24 @@ iavf_configure_queues(struct iavf_adapter *adapter,
 	     i++, vc_qp++) {
 		vc_qp->txq.vsi_id = vf->vsi_res->vsi_id;
 		vc_qp->txq.queue_id = i;
-		/* Virtchnnl configure queues by pairs */
+
+		/* Virtchnnl configure tx queues by pairs */
 		if (i < adapter->eth_dev->data->nb_tx_queues) {
 			vc_qp->txq.ring_len = txq[i]->nb_tx_desc;
 			vc_qp->txq.dma_ring_addr = txq[i]->tx_ring_phys_addr;
 		}
+
 		vc_qp->rxq.vsi_id = vf->vsi_res->vsi_id;
 		vc_qp->rxq.queue_id = i;
 		vc_qp->rxq.max_pkt_size = vf->max_pkt_len;
-		/* Virtchnnl configure queues by pairs */
-		if (i < adapter->eth_dev->data->nb_rx_queues) {
-			vc_qp->rxq.ring_len = rxq[i]->nb_rx_desc;
-			vc_qp->rxq.dma_ring_addr = rxq[i]->rx_ring_phys_addr;
-			vc_qp->rxq.databuffer_size = rxq[i]->rx_buf_len;
-		}
+
+		if (i >= adapter->eth_dev->data->nb_rx_queues)
+			continue;
+
+		/* Virtchnnl configure rx queues by pairs */
+		vc_qp->rxq.ring_len = rxq[i]->nb_rx_desc;
+		vc_qp->rxq.dma_ring_addr = rxq[i]->rx_ring_phys_addr;
+		vc_qp->rxq.databuffer_size = rxq[i]->rx_buf_len;
 
 #ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
 		if (vf->vf_res->vf_cap_flags &
Signature · 1 line
2.20.1
Acked-by on v1 1/1 Applied
#2 lore raw
In reply to Jeff Guo
Quoted 10 lines

-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Monday, November 9, 2020 2:05 PM
To: Wu, Jingjing <[email protected]>; Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>
Subject: [PATCH v1] net/iavf: fix rxdid configure

Quoted 6 lines

When configure rx queue by virtchnnl, the rxdid should be configured only if the rx queue has been setting up.

Fixes 12b435bf8f2f ("net/iavf: support flex desc metadata extraction")

Applied to dpdk-next-net-intel.

Thanks
Qi