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 D0BFDA0548; Mon, 26 Apr 2021 11:04:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B613441190; Mon, 26 Apr 2021 11:04:40 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 9F8714118E for ; Mon, 26 Apr 2021 11:04:39 +0200 (CEST) IronPort-SDR: My9RcHZpz2TEgszi6bLNcC2jopKRIPQT/Fp03wXqLxXq5JLYQffYJZNgh2GbnvOV75ufy5y+sB 4E0nqLo3Gyag== X-IronPort-AV: E=McAfee;i="6200,9189,9965"; a="193118183" X-IronPort-AV: E=Sophos;i="5.82,252,1613462400"; d="scan'208";a="193118183" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2021 02:04:38 -0700 IronPort-SDR: pzKSVhtSF/1J+MG88UpANWmnAfR5WnBq/u6X/W0jluSLFCZs3AyB6nXy3SYwObWMRB8jQlzhZ8 coYozkTeJ/Vg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,252,1613462400"; d="scan'208";a="454218587" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by FMSMGA003.fm.intel.com with ESMTP; 26 Apr 2021 02:04:38 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) 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.2106.2; Mon, 26 Apr 2021 02:04:37 -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.2106.2; Mon, 26 Apr 2021 17:04:35 +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.2106.013; Mon, 26 Apr 2021 17:04:35 +0800 From: "Zhang, Qi Z" To: "Lu, Wenzhuo" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix performance drop Thread-Index: AQHXOl1AdFJRx8jiXEa2nY87MeuTbKrGf/Gg Date: Mon, 26 Apr 2021 09:04:35 +0000 Message-ID: <0e87d690425949c3839a1ac48dc0406b@intel.com> References: <1619414983-131070-1-git-send-email-wenzhuo.lu@intel.com> In-Reply-To: <1619414983-131070-1-git-send-email-wenzhuo.lu@intel.com> 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] net/iavf: fix performance drop 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 Sender: "dev" > -----Original Message----- > From: dev On Behalf Of Wenzhuo Lu > Sent: Monday, April 26, 2021 1:30 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo > Subject: [dpdk-dev] [PATCH] net/iavf: fix performance drop >=20 > AVX2 and SSE don't have the offload path. > Not necessary doing any check. Or the scalar path will be chosen. >=20 > Fixes: eff56a7b9f97 ("net/iavf: add offload path for Rx AVX512") >=20 > Signed-off-by: Wenzhuo Lu > --- > drivers/net/iavf/iavf_rxtx.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c = index > 3f3cf63..0ba19dbf 100644 > --- a/drivers/net/iavf/iavf_rxtx.c > +++ b/drivers/net/iavf/iavf_rxtx.c > @@ -2401,13 +2401,11 @@ > check_ret =3D iavf_rx_vec_dev_check(dev); > if (check_ret >=3D 0 && > rte_vect_get_max_simd_bitwidth() >=3D RTE_VECT_SIMD_128) { > - if (check_ret =3D=3D IAVF_VECTOR_PATH) { > - use_sse =3D true; > - if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) =3D=3D 1 || > - rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) =3D=3D 1) > && > - rte_vect_get_max_simd_bitwidth() >=3D > RTE_VECT_SIMD_256) > - use_avx2 =3D true; > - } > + use_sse =3D true; > + if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) =3D=3D 1 || > + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) =3D=3D 1) && > + rte_vect_get_max_simd_bitwidth() >=3D RTE_VECT_SIMD_256) > + use_avx2 =3D true; Not sure if the right path will be selected when avx512 is not true, (CC_AV= X512_SUPPORT is disable) while check_ret is IAVF_VECTOR_OFFLOAD_PATH? Currently we have=20 if (!use_sse && !use_avx2 && !use_avx512) goto normal; Should we also add below check? if (!use_avx512 && check_ret =3D=3D IAVF_VECTOR_OFFLOAD_PATH) goto normal; >=20 > #ifdef CC_AVX512_SUPPORT > if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) =3D=3D 1 && > -- > 1.9.3