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 86141A0540; Mon, 20 Jul 2020 12:33:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 302691DBB; Mon, 20 Jul 2020 12:33:51 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id F34E21AFB; Mon, 20 Jul 2020 12:33:48 +0200 (CEST) IronPort-SDR: fXpIG/IzSAlF/iFqqdlw4U6xsxhv0DmXL78soRnoJBhNR3z4DqORQF9LuYbjlpmnLbsd0MGdXx bDIlqnKiLg5w== X-IronPort-AV: E=McAfee;i="6000,8403,9687"; a="234737227" X-IronPort-AV: E=Sophos;i="5.75,374,1589266800"; d="scan'208";a="234737227" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2020 03:33:47 -0700 IronPort-SDR: juhxHEhvwbBtoBrxoeO8nNahXgRimYoy/toMJiqHWzHeUcZUnSJSO/BQZUaOAY3dxRDCXZ9/me 8MgPUiT8TG2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,374,1589266800"; d="scan'208";a="317971694" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga008.jf.intel.com with ESMTP; 20 Jul 2020 03:33:47 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Jul 2020 03:33:47 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Jul 2020 03:33:46 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.22]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.32]) with mapi id 14.03.0439.000; Mon, 20 Jul 2020 18:31:06 +0800 From: "Zhang, Qi Z" To: "Jiang, MaoX" , "Ye, Xiaolong" CC: "dev@dpdk.org" , "stable@dpdk.org" , "Jiang, MaoX" Thread-Topic: [dpdk-dev] [PATCH 2/2] net/i40e: fix fdir allocating msix resource error Thread-Index: AQHWPgfEz64IFRZLQ02ND9Ts0UNnjaj9wH+AgBLDnCA= Date: Mon, 20 Jul 2020 10:31:06 +0000 Message-ID: <039ED4275CED7440929022BC67E70611548625B6@SHSMSX103.ccr.corp.intel.com> References: <20200609022538.27665-2-maox.jiang@intel.com> <20200708195239.4543-1-maox.jiang@intel.com> In-Reply-To: <20200708195239.4543-1-maox.jiang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 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" > -----Original Message----- > From: dev On Behalf Of Jiang Mao > Sent: Thursday, July 9, 2020 3:53 AM > To: Ye, Xiaolong > Cc: dev@dpdk.org; stable@dpdk.org; Jiang, MaoX > Subject: [dpdk-dev] [PATCH 2/2] net/i40e: fix fdir allocating msix resour= ce error >=20 > Fdir allocating msix resource is not strictly necessary, if no resource l= eft, print a > warning message. >=20 > Fixes: 4861cde461 (i40e: new poll mode driver) > Cc: stable@dpdk.org > Signed-off-by: Jiang Mao > --- > drivers/net/i40e/i40e_ethdev.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 16fcb8d..885b637 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -5732,6 +5732,17 @@ struct i40e_vsi * > vsi->nb_msix =3D RTE_MIN(vsi->nb_qps, > RTE_MAX_RXTX_INTR_VEC_ID); > } > + } else if (type =3D=3D I40E_VSI_FDIR) { > + ret =3D i40e_res_pool_alloc(&pf->msix_pool, 1); > + if (ret < 0) { > + PMD_DRV_LOG(WARNING, "MSIX vectors used up, FDIR can`t > bind interrupt"); > + vsi->msix_intr =3D 0; > + vsi->nb_msix =3D 0; > + } else { > + vsi->msix_intr =3D ret; > + vsi->nb_msix =3D 1; > + } > + Better to merge above branch into below branch and remove the "else" branch > } else if (type !=3D I40E_VSI_SRIOV) { > ret =3D i40e_res_pool_alloc(&pf->msix_pool, 1); > if (ret < 0) { > -- > 1.8.3.1