From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 71560A0527; Mon, 9 Nov 2020 07:15:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5A2658C4; Mon, 9 Nov 2020 07:15:04 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 7F409323C for ; Mon, 9 Nov 2020 07:15:03 +0100 (CET) IronPort-SDR: u7AvgcScERIPfq3YpiPbetEccU86QPo+AaOAzRTjkRotXcAEX3tzeM5SYU48xrF2pMU8E9ey6v UX7qYgtFaKTQ== X-IronPort-AV: E=McAfee;i="6000,8403,9799"; a="149033907" X-IronPort-AV: E=Sophos;i="5.77,462,1596524400"; d="scan'208";a="149033907" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2020 22:15:01 -0800 IronPort-SDR: w95XnUwKR6Gcznf2kbBrBHukMdpT/ePo4tWhWMfZBZZPHiojLa5P13N4/v99WisZ5sEBcPnTtN aiQBQK2t4HFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,462,1596524400"; d="scan'208";a="530585034" Received: from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128]) by fmsmga005.fm.intel.com with ESMTP; 08 Nov 2020 22:14:59 -0800 From: Jeff Guo To: jingjing.wu@intel.com, qi.z.zhang@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, jia.guo@intel.com Date: Mon, 9 Nov 2020 14:05:17 +0800 Message-Id: <20201109060517.88557-1-jia.guo@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1] net/iavf: fix rxdid configure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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