DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeff Guo <jia.guo@intel.com>
To: jingjing.wu@intel.com, qi.z.zhang@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, jia.guo@intel.com
Subject: [dpdk-dev] [PATCH v1] net/iavf: fix rxdid configure
Date: Mon,  9 Nov 2020 14:05:17 +0800	[thread overview]
Message-ID: <20201109060517.88557-1-jia.guo@intel.com> (raw)

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")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 64d194670..33d03af65 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -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 &
-- 
2.20.1


             reply	other threads:[~2020-11-09  6:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09  6:05 Jeff Guo [this message]
2020-11-09  8:51 ` Han, YingyaX
2020-11-10  2:37 ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201109060517.88557-1-jia.guo@intel.com \
    --to=jia.guo@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).