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 ADA8AA04BC; Fri, 9 Oct 2020 03:05:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8FA8D1BCFC; Fri, 9 Oct 2020 03:05:26 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 01DE525D9 for ; Fri, 9 Oct 2020 03:05:24 +0200 (CEST) IronPort-SDR: eefnjZiY3B0Jqo0ZObQPUwqe5TvmJBhXeVhdIqrtVARqR40VZMasjFiNfj8yUvm1SVWVH/QNns /6AsTGa48Lug== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="250121327" X-IronPort-AV: E=Sophos;i="5.77,353,1596524400"; d="scan'208";a="250121327" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 18:05:23 -0700 IronPort-SDR: hcHRBF2eBZiv1sxB3PVIWUYSSrOAYBvFmEDuBcej3At9FFBb/VV7m16g0dbk4uU1z18mPdPpEs e9N+TRm2PPZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,353,1596524400"; d="scan'208";a="419271276" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 08 Oct 2020 18:05:23 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 8 Oct 2020 18:05:22 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 9 Oct 2020 09:05:20 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Fri, 9 Oct 2020 09:05:20 +0800 From: "Zhang, Qi Z" To: "Power, Ciara" , "dev@dpdk.org" CC: "Yang, Qiming" Thread-Topic: [PATCH v3 10/18] net/ice: add checks for max SIMD bitwidth Thread-Index: AQHWlyrEMh6r5Yv8/EW6fika74lUNamOcMJggAAQNSA= Date: Fri, 9 Oct 2020 01:05:20 +0000 Message-ID: <3d67027a4493470aae930384f326617e@intel.com> References: <20200807155859.63888-1-ciara.power@intel.com> <20200930130415.11211-1-ciara.power@intel.com> <20200930130415.11211-11-ciara.power@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.5.1.3 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 Subject: Re: [dpdk-dev] [PATCH v3 10/18] net/ice: add checks for max SIMD bitwidth 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: Zhang, Qi Z > Sent: Friday, October 9, 2020 8:05 AM > To: Power, Ciara ; dev@dpdk.org > Cc: Yang, Qiming > Subject: RE: [PATCH v3 10/18] net/ice: add checks for max SIMD bitwidth >=20 >=20 >=20 > > -----Original Message----- > > From: Power, Ciara > > Sent: Wednesday, September 30, 2020 9:04 PM > > To: dev@dpdk.org > > Cc: Power, Ciara ; Yang, Qiming > > ; Zhang, Qi Z > > Subject: [PATCH v3 10/18] net/ice: add checks for max SIMD bitwidth > > > > When choosing a vector path to take, an extra condition must be > > satisfied to ensure the max SIMD bitwidth allows for the CPU enabled pa= th. > > > > Cc: Qiming Yang > > Cc: Qi Zhang > > > > Signed-off-by: Ciara Power >=20 > Acked-by: Qi Zhang I'd like to withdraw my ack, due to more consideration as below >=20 > > --- > > drivers/net/ice/ice_rxtx.c | 20 ++++++++++++++------ > > 1 file changed, 14 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c > > index fef6ad4544..5a29af743c 100644 > > --- a/drivers/net/ice/ice_rxtx.c > > +++ b/drivers/net/ice/ice_rxtx.c > > @@ -2936,7 +2936,9 @@ ice_set_rx_function(struct rte_eth_dev *dev) > > bool use_avx2 =3D false; > > > > if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > > - if (!ice_rx_vec_dev_check(dev) && ad->rx_bulk_alloc_allowed) { > > + if (!ice_rx_vec_dev_check(dev) && ad->rx_bulk_alloc_allowed && > > + rte_get_max_simd_bitwidth() > > + >=3D RTE_MAX_128_SIMD) { > > ad->rx_vec_allowed =3D true; > > for (i =3D 0; i < dev->data->nb_rx_queues; i++) { > > rxq =3D dev->data->rx_queues[i]; > > @@ -2946,8 +2948,10 @@ ice_set_rx_function(struct rte_eth_dev *dev) > > } > > } > > > > - if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) =3D=3D 1 || > > - rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) =3D=3D 1) > > + if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) =3D=3D 1 || > > + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) =3D=3D 1) && > > + rte_get_max_simd_bitwidth() > > + >=3D RTE_MAX_256_SIMD) As we have this max SIMD hint, the avx512 flag check is not necessary,=20 and I think for old platform which not support avx512, the default RTE_DEFA= ULT_SIMD_BITWIDTH should be configured to 128, so AVX2 will not be over use= d. > > use_avx2 =3D true; > > > > } else { > > @@ -3114,7 +3118,9 @@ ice_set_tx_function(struct rte_eth_dev *dev) > > bool use_avx2 =3D false; > > > > if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > > - if (!ice_tx_vec_dev_check(dev)) { > > + if (!ice_tx_vec_dev_check(dev) && > > + rte_get_max_simd_bitwidth() > > + >=3D RTE_MAX_128_SIMD) { > > ad->tx_vec_allowed =3D true; > > for (i =3D 0; i < dev->data->nb_tx_queues; i++) { > > txq =3D dev->data->tx_queues[i]; > > @@ -3124,8 +3130,10 @@ ice_set_tx_function(struct rte_eth_dev *dev) > > } > > } > > > > - if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) =3D=3D 1 || > > - rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) =3D=3D 1) > > + if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) =3D=3D 1 || > > + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) =3D=3D 1) && > > + rte_get_max_simd_bitwidth() > > + >=3D RTE_MAX_256_SIMD) > > use_avx2 =3D true; > > > > } else { > > -- > > 2.17.1