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 6F203A0A0E; Wed, 28 Apr 2021 13:32:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4DD2410E0; Wed, 28 Apr 2021 13:32:14 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 970EA40147 for ; Wed, 28 Apr 2021 13:32:13 +0200 (CEST) IronPort-SDR: y08wGDAsFsmW9TJXbXfN77iVXR+xbfzxCNurKT7FVu911yT5n9RyYsL9FCMKgjzzX9RQe5PTmE 5nkqG4zaVhRA== X-IronPort-AV: E=McAfee;i="6200,9189,9967"; a="184200833" X-IronPort-AV: E=Sophos;i="5.82,258,1613462400"; d="scan'208";a="184200833" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2021 04:32:09 -0700 IronPort-SDR: C1JuA1GxGGkfIdSSDOS3yEaj1rJMvHpa/a+bH21B0L7f8hNE5QtJIiu82Dr5OpqGhP4TERf31r Q3QBZFM0/H2Q== X-IronPort-AV: E=Sophos;i="5.82,258,1613462400"; d="scan'208";a="423494039" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.241.177]) ([10.213.241.177]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2021 04:32:07 -0700 To: Wenzhuo Lu , dev@dpdk.org References: <1619414983-131070-1-git-send-email-wenzhuo.lu@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <341c212e-e6d0-b0d5-da29-51862fe35348@intel.com> Date: Wed, 28 Apr 2021 12:32:04 +0100 MIME-Version: 1.0 In-Reply-To: <1619414983-131070-1-git-send-email-wenzhuo.lu@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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" On 4/26/2021 6:29 AM, Wenzhuo Lu wrote: > AVX2 and SSE don't have the offload path. > Not necessary doing any check. Or the scalar path > will be chosen. Hi Wenzhuo, The fix by not changing Rx implementation, but making sure correct Rx path selected, right? Can you please clarify this in the commit log? So the performance drop fixed for whoever have the vector path supported and offloads enabled, can be good to highlight in the patch title, otherwise it is too generic. > > Fixes: eff56a7b9f97 ("net/iavf: add offload path for Rx AVX512") > I am not clear what caused the performance drop. Before above patch, vector path was not supporting the offloads and scalar path should be selected. After above patch, still scalar path selected, although vector path supports offloads, but for both before and after scalar path is selected, so why/when the performance drop happens? Can you please clarify in the commit log, how to reproduce performance drop? > Signed-off-by: Wenzhuo Lu > --- > drivers/net/iavf/iavf_rxtx.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > 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 = iavf_rx_vec_dev_check(dev); > if (check_ret >= 0 && > rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) { > - if (check_ret == IAVF_VECTOR_PATH) { > - use_sse = true; > - if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 || > - rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) && > - rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256) > - use_avx2 = true; > - } > + use_sse = true; > + if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 || > + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) && > + rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256) > + use_avx2 = true; > > #ifdef CC_AVX512_SUPPORT > if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 && >