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 1EA86A0530; Mon, 3 Feb 2020 10:55:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E79001BFE3; Mon, 3 Feb 2020 10:55:35 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 88F261BFE2 for ; Mon, 3 Feb 2020 10:55:33 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Feb 2020 01:55:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,397,1574150400"; d="scan'208";a="223884384" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga008.jf.intel.com with ESMTP; 03 Feb 2020 01:55:31 -0800 Date: Mon, 3 Feb 2020 17:54:35 +0800 From: Ye Xiaolong To: Lunyuan Cui Cc: dev@dpdk.org, Qiming Yang Message-ID: <20200203095435.GL54838@intel.com> References: <200110083514.134541-1-lunyuanx.cui@intel.com> <20200117082258.2437-1-lunyuanx.cui@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200117082258.2437-1-lunyuanx.cui@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v4] net/i40e: fix multi-queue Rx interrupt for VF 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" On 01/17, Lunyuan Cui wrote: >The interrupt vector which bind to queues should not larger than should not be larger than >the max avaiable vertor. It will cause port start failed. This patch s/avaiable/available s/vertor/vector >changed the judgement condition of the limited vector id. It can >effectively avoid vector id out of range. > >Fixes: 5b8d2d89dd99 (net/i40e: enable multi-queue Rx interrupt for VF) Should be Fixes: 6a6cf5f88b4a ("net/i40e: enable multi-queue Rx interrupt for VF") Applied to dpdk-next-net-intel with above fixes, Thanks. > >Signed-off-by: Lunyuan Cui >--- >v4: >- Change commit message > >v3: >- Change commit message > >v2: >- Change commit message >--- > drivers/net/i40e/i40e_ethdev_vf.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > >diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c >index 479f8282c..d514e8991 100644 >--- a/drivers/net/i40e/i40e_ethdev_vf.c >+++ b/drivers/net/i40e/i40e_ethdev_vf.c >@@ -657,7 +657,6 @@ i40evf_config_irq_map(struct rte_eth_dev *dev) > struct rte_intr_handle *intr_handle = &pci_dev->intr_handle; > uint32_t vector_id; > int i, err; >- uint16_t nb_msix; > > if (dev->data->dev_conf.intr_conf.rxq != 0 && > rte_intr_allow_others(intr_handle)) >@@ -665,9 +664,6 @@ i40evf_config_irq_map(struct rte_eth_dev *dev) > else > vector_id = I40E_MISC_VEC_ID; > >- nb_msix = RTE_MIN(vf->vf_res->max_vectors, >- intr_handle->nb_efd); >- > map_info = (struct virtchnl_irq_map_info *)cmd_buffer; > map_info->num_vectors = dev->data->nb_rx_queues; > for (i = 0; i < dev->data->nb_rx_queues; i++) { >@@ -682,7 +678,7 @@ i40evf_config_irq_map(struct rte_eth_dev *dev) > intr_handle->intr_vec[i] = vector_id; > if (vector_id > I40E_MISC_VEC_ID) > vector_id++; >- if (vector_id > nb_msix) >+ if (vector_id >= vf->vf_res->max_vectors) > vector_id = I40E_RX_VEC_START; > } > >-- >2.17.1 >