From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D7EAEA0510; Wed, 27 Apr 2022 02:06:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72B0E40E78; Wed, 27 Apr 2022 02:06:31 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 06B7C40691 for ; Wed, 27 Apr 2022 02:06:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651017990; x=1682553990; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=L8UeeOLDCiuD3VPDlz6mwjZ9WrLr5H8Df+7FpBtnDIg=; b=aosEg8AHlHE7OeugDnyWtFcYSF643T2vu/JNEw6MsVX82Y3BD5JeL3rH S6kd2nW51ur/E5VVUzYajIYo/qq5RrY7uhgnDCwhToGsO2hgO45HY/iIw R5jbr/oho/MMRECzjZoj0yM8bUEZB1gvPbHAey5mdzHzQqThA1WEfbMit GX+g5lK0PsQ3kDqB91pJgTLIh0Ai+Ov0iShUjIoa+AKgLurgAFgGAGMeT bfd8FabqLMgocXlUWpDA5gpy71YfRc3DO8K5y11xRj2LH6mTnPSNnXfZY 4cdn/vLwtoIQNGVrRt1a4MgEzctW98p/2m9ZYmHGQa9Iaq35ZxQ6paD2M w==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="265923867" X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="265923867" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2022 17:06:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="564826826" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga007.fm.intel.com with ESMTP; 26 Apr 2022 17:06:25 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 26 Apr 2022 17:06:25 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 26 Apr 2022 17:06:24 -0700 Received: from fmsmsx612.amr.corp.intel.com ([10.18.126.92]) by fmsmsx612.amr.corp.intel.com ([10.18.126.92]) with mapi id 15.01.2308.027; Tue, 26 Apr 2022 17:06:24 -0700 From: "Zhang, Qi Z" To: "Wu, Wenjun1" , "Yang, Qiming" CC: "dev@dpdk.org" Subject: RE: [PATCH v2] net/ice: optimize max queue number calculation Thread-Topic: [PATCH v2] net/ice: optimize max queue number calculation Thread-Index: AQHYSzqaCc4SrSbWEkCesE4XulND2q0CveYAgABA1VA= Date: Wed, 27 Apr 2022 00:06:24 +0000 Message-ID: References: <20220408112343.2632618-1-qi.z.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.401.20 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Wu, Wenjun1 > Sent: Tuesday, April 26, 2022 9:14 PM > To: Zhang, Qi Z ; Yang, Qiming > Cc: dev@dpdk.org > Subject: RE: [PATCH v2] net/ice: optimize max queue number calculation >=20 >=20 >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Friday, April 8, 2022 7:24 PM > > To: Yang, Qiming ; Wu, Wenjun1 > > > > Cc: dev@dpdk.org; Zhang, Qi Z > > Subject: [PATCH v2] net/ice: optimize max queue number calculation > > > > Remove the limitation that max queue pair number must be 2^n. > > With this patch, even on a 8 ports device, the max queue pair number > > increased from 128 to 254. > > > > Signed-off-by: Qi Zhang > > --- > > > > v2: > > - fix check patch warning > > > > drivers/net/ice/ice_ethdev.c | 24 ++++++++++++++++++++---- > > 1 file changed, 20 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/net/ice/ice_ethdev.c > > b/drivers/net/ice/ice_ethdev.c index > > 73e550f5fb..ff2b3e45d9 100644 > > --- a/drivers/net/ice/ice_ethdev.c > > +++ b/drivers/net/ice/ice_ethdev.c > > @@ -819,10 +819,26 @@ ice_vsi_config_tc_queue_mapping(struct ice_vsi > > *vsi, > > return -ENOTSUP; > > } > > > > - vsi->nb_qps =3D RTE_MIN(vsi->nb_qps, ICE_MAX_Q_PER_TC); > > - fls =3D (vsi->nb_qps =3D=3D 0) ? 0 : rte_fls_u32(vsi->nb_qps) - 1; > > - /* Adjust the queue number to actual queues that can be applied */ > > - vsi->nb_qps =3D (vsi->nb_qps =3D=3D 0) ? 0 : 0x1 << fls; > > + /* vector 0 is reserved and 1 vector for ctrl vsi */ > > + if (vsi->adapter->hw.func_caps.common_cap.num_msix_vectors < 2) > > + vsi->nb_qps =3D 0; > > + else > > + vsi->nb_qps =3D RTE_MIN > > + ((uint16_t)vsi->adapter- > > >hw.func_caps.common_cap.num_msix_vectors - 2, > > + RTE_MIN(vsi->nb_qps, ICE_MAX_Q_PER_TC)); > > + > > + /* nb_qps(hex) -> fls */ > > + /* 0000 -> 0 */ > > + /* 0001 -> 0 */ > > + /* 0002 -> 1 */ > > + /* 0003 ~ 0004 -> 2 */ > > + /* 0005 ~ 0008 -> 3 */ > > + /* 0009 ~ 0010 -> 4 */ > > + /* 0011 ~ 0020 -> 5 */ > > + /* 0021 ~ 0040 -> 6 */ > > + /* 0041 ~ 0080 -> 7 */ > > + /* 0081 ~ 0100 -> 8 */ > > + fls =3D (vsi->nb_qps =3D=3D 0) ? 0 : rte_fls_u32(vsi->nb_qps - 1); > > > > qp_idx =3D 0; > > /* Set tc and queue mapping with VSI */ > > -- > > 2.26.2 >=20 > Acked-by: Wenjun Wu < wenjun1.wu@intel.com> >=20 > Thanks > Wenjun >=20 Applied to dpdk-next-net-intel. Thanks Qi