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 F04BCA0352; Thu, 14 May 2020 14:43:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 95F361D917; Thu, 14 May 2020 14:43:50 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 8767D1D916 for ; Thu, 14 May 2020 14:43:48 +0200 (CEST) IronPort-SDR: Sb3amMj/wS1r96ibI34Xeyian6kxB8QsNv+x1CjsUZqLSkg1Z/jDfajrVCdDx6c6iY4JsVU33J ppEBv2zQOkuA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 05:43:47 -0700 IronPort-SDR: ASLy5xreowkgODOxtJVz5O/mvBY5gVswSVYriy8cHNh8DicXt603QSxAzHUFhgQ/mTnMK95qcB VI2BlSrlzfHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,391,1583222400"; d="scan'208";a="307091781" Received: from vmedvedk-mobl.ger.corp.intel.com (HELO [10.212.163.157]) ([10.212.163.157]) by FMSMGA003.fm.intel.com with ESMTP; 14 May 2020 05:43:46 -0700 To: Bruce Richardson Cc: dev@dpdk.org, konstantin.ananyev@intel.com References: <1583757826-375246-1-git-send-email-vladimir.medvedkin@intel.com> <83e42337892459bdbd629d89b6352366f477f486.1589458934.git.vladimir.medvedkin@intel.com> <20200514124038.GA375@bricha3-MOBL.ger.corp.intel.com> From: "Medvedkin, Vladimir" Message-ID: Date: Thu, 14 May 2020 13:43:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200514124038.GA375@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2 3/6] fib: introduce AVX512 lookup 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" Hi Bruce, On 14/05/2020 13:40, Bruce Richardson wrote: > On Thu, May 14, 2020 at 01:28:27PM +0100, Vladimir Medvedkin wrote: >> Add new lookup implementation for DIR24_8 algorithm using >> AVX512 instruction set >> >> Signed-off-by: Vladimir Medvedkin >> --- > >> diff --git a/lib/librte_fib/meson.build b/lib/librte_fib/meson.build >> index 771828f..86b1d4a 100644 >> --- a/lib/librte_fib/meson.build >> +++ b/lib/librte_fib/meson.build >> @@ -5,3 +5,13 @@ >> sources = files('rte_fib.c', 'rte_fib6.c', 'dir24_8.c', 'trie.c') >> headers = files('rte_fib.h', 'rte_fib6.h') >> deps += ['rib'] >> + >> +if dpdk_conf.has('RTE_ARCH_X86') >> + if cc.has_argument('-mavx512f') >> + cflags += '-DCC_AVX512_SUPPORT' >> + cflags += '-mavx512f' >> + endif >> + if cc.has_argument('-mavx512dq') >> + cflags += '-mavx512dq' >> + endif >> +endif > This will likely break the FIB library for systems which don't have AVX-512 > support, since you are enabling AVX-512 for the whole library, meaning that > the compiler can put AVX-512 instructions anywhere it wants in the library. > You need to separate out the AVX-512 code into a separate file, and compile > that file - and only that file - for AVX-512. An example of how this should > be done, can be seen in the AVX support in the i40e net driver. Ah, yes, you're right. I will rework this part. Thanks! > > Regards, > /Bruce -- Regards, Vladimir