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 41A2FA0526; Wed, 22 Jul 2020 08:08:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 993431C00D; Wed, 22 Jul 2020 08:08:05 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0C44D1BFBB; Wed, 22 Jul 2020 08:07:58 +0200 (CEST) IronPort-SDR: uwPdvK+9Vo0Tgpj6zHbvX9y1cBm78XAPRGCYCbV4nkf+KK5WwyH3WotjBD/ra3S2hRjqefDrfV u3mp+HDmc52w== X-IronPort-AV: E=McAfee;i="6000,8403,9689"; a="214918289" X-IronPort-AV: E=Sophos;i="5.75,381,1589266800"; d="scan'208";a="214918289" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 23:07:58 -0700 IronPort-SDR: D4F4dhD7tdI9IdLOmlmNznvClFpaY3x2Z5TQD3xRXTpwieOGlvOApmU3SFPUSXK2DJau+ve4GE 30PEoRcrsYiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,381,1589266800"; d="scan'208";a="301850402" Received: from dut85.sh.intel.com ([10.240.183.157]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 23:07:57 -0700 From: Jiang Mao To: qi.z.zhang@intel.com Cc: dev@dpdk.org, stable@dpdk.org, Jiang Mao Date: Thu, 23 Jul 2020 01:57:38 +0800 Message-Id: <20200722175738.32490-2-maox.jiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200722175738.32490-1-maox.jiang@intel.com> References: <20200708195034.4495-1-maox.jiang@intel.com> <20200722175738.32490-1-maox.jiang@intel.com> Subject: [dpdk-dev] [PATCH v3 2/2] net/i40e: fix fdir allocating msix resource error 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" Fdir allocating msix resource is not strictly necessary, if no resource left, jump the error. Fixes: 4861cde461 (i40e: new poll mode driver) Cc: stable@dpdk.org Signed-off-by: Jiang Mao --- V3: Move type I40E_VSI_FDIR branch into !I40E_VSI_SRIOV branch. --- drivers/net/i40e/i40e_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 16fcb8d24e..c19bf868ea 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -5736,10 +5736,14 @@ i40e_vsi_setup(struct i40e_pf *pf, ret = i40e_res_pool_alloc(&pf->msix_pool, 1); if (ret < 0) { PMD_DRV_LOG(ERR, "VSI %d get heap failed %d", vsi->seid, ret); - goto fail_queue_alloc; + if (type != I40E_VSI_FDIR) + goto fail_queue_alloc; + vsi->msix_intr = 0; + vsi->nb_msix = 0; + } else { + vsi->msix_intr = ret; + vsi->nb_msix = 1; } - vsi->msix_intr = ret; - vsi->nb_msix = 1; } else { vsi->msix_intr = 0; vsi->nb_msix = 0; -- 2.17.1