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 88FF5A04B5; Thu, 10 Sep 2020 11:30:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E5E21C0CC; Thu, 10 Sep 2020 11:30:04 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id E30D71C0CA for ; Thu, 10 Sep 2020 11:30:02 +0200 (CEST) IronPort-SDR: stUl2GvjtQO1AbtP1RebqyBKIN1SUY+MVj2T02w4XGHXotKHhj2Nh1SFIE1ihG1t7QSb6HcXsZ XVNsewq1jKIg== X-IronPort-AV: E=McAfee;i="6000,8403,9739"; a="138531937" X-IronPort-AV: E=Sophos;i="5.76,412,1592895600"; d="scan'208";a="138531937" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 02:30:02 -0700 IronPort-SDR: Q/kFb0Qr86HMUB3JrPA0+8Gam+omLla6ZLYreeBd/YrTyacwhGWTZaD6vFJKx5mrchzNA03f+i ipWQs4MsISTg== X-IronPort-AV: E=Sophos;i="5.76,412,1592895600"; d="scan'208";a="480820008" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.5.251]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 10 Sep 2020 02:30:00 -0700 Date: Thu, 10 Sep 2020 10:29:57 +0100 From: Bruce Richardson To: Wenzhuo Lu Cc: dev@dpdk.org, Leyi Rong Message-ID: <20200910092957.GE1789@bricha3-MOBL.ger.corp.intel.com> References: <1599717545-106571-1-git-send-email-wenzhuo.lu@intel.com> <1599717545-106571-2-git-send-email-wenzhuo.lu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1599717545-106571-2-git-send-email-wenzhuo.lu@intel.com> Subject: Re: [dpdk-dev] [PATCH 1/3] net/iavf: enable AVX512 for legacy RX 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" On Thu, Sep 10, 2020 at 01:59:03PM +0800, Wenzhuo Lu wrote: > To enhance the per-core performance, this patch adds some AVX512 > instructions to the data path to handle the legacy RX descriptors. > > Signed-off-by: Wenzhuo Lu > Signed-off-by: Bruce Richardson > Signed-off-by: Leyi Rong > --- > drivers/net/iavf/iavf_rxtx.c | 27 +- > drivers/net/iavf/iavf_rxtx.h | 5 + > drivers/net/iavf/iavf_rxtx_vec_avx512.c | 720 ++++++++++++++++++++++++++++++++ > drivers/net/iavf/meson.build | 7 + > 4 files changed, 755 insertions(+), 4 deletions(-) > create mode 100644 drivers/net/iavf/iavf_rxtx_vec_avx512.c > > diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build > index a3fad36..6427885 100644 > --- a/drivers/net/iavf/meson.build > +++ b/drivers/net/iavf/meson.build > @@ -34,4 +34,11 @@ if arch_subdir == 'x86' > c_args: [cflags, '-mavx2']) > objs += iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c') > endif > + > + if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX512F') > + cflags += ['-DCC_AVX512_SUPPORT'] > + cflags += ['-mavx512f'] > + cflags += ['-march=skylake-avx512'] > + sources += files('iavf_rxtx_vec_avx512.c') > + endif This logic is probably not what you want, since if the machine cpuflag value is set, then AVX512 instructions are already available, meaning you don't need to add in the mavx512 and march flags. Instead the logic should be handling the case where it's not enabled, but the compiler supports it. Use the AVX2 build logic as a reference. > endif > -- > 1.9.3 >