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 96C4DA04B5; Tue, 27 Oct 2020 16:57:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D55FBE45; Tue, 27 Oct 2020 16:57:26 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 2737BBE3F for ; Tue, 27 Oct 2020 16:57:22 +0100 (CET) IronPort-SDR: cAL+ye8v2rKZvYp2ptmOrXpC8xVPFxRyk7Fs9D05AOd+AhgKWuZi3iX68cjPNh24MqUtGe6JuC GTVU2sR36Ehg== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="229745532" X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="229745532" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 08:57:21 -0700 IronPort-SDR: YMiWF6sK0bDqFIveyiPCyY+7nd3Lnm0GzrcZtW8KIQr7vF7uwvO7C+UuM5/i64Tdd8MMVmFeoq h71pF0UZ83Aw== X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="535843028" Received: from bricha3-mobl.ger.corp.intel.com ([10.214.252.158]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 27 Oct 2020 08:57:16 -0700 Date: Tue, 27 Oct 2020 15:57:11 +0000 From: Bruce Richardson To: "Rong, Leyi" Cc: Ali Alnubani , "Yigit, Ferruh" , "Zhang, Qi Z" , "Lu, Wenzhuo" , Andrew Rybchenko , David Marchand , Raslan Darawsheh , "dev@dpdk.org" Message-ID: <20201027155711.GB956@bricha3-MOBL.ger.corp.intel.com> References: <20201027101926.112609-1-leyi.rong@intel.com> <20201027132750.GI936@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] net/ice: add AVX512BW flag check both in build and runtime 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 Tue, Oct 27, 2020 at 03:36:58PM +0000, Rong, Leyi wrote: > > > -----Original Message----- > > From: Bruce Richardson > > Sent: Tuesday, October 27, 2020 9:28 PM > > To: Ali Alnubani > > Cc: Yigit, Ferruh ; Rong, Leyi ; > > Zhang, Qi Z ; Lu, Wenzhuo ; > > Andrew Rybchenko ; David Marchand > > ; Raslan Darawsheh ; > > dev@dpdk.org > > Subject: Re: [PATCH] net/ice: add AVX512BW flag check both in build and > > runtime > > > > On Tue, Oct 27, 2020 at 01:12:20PM +0000, Ali Alnubani wrote: > > > Hi, > > > > > > > -----Original Message----- > > > > From: Ferruh Yigit > > > > Sent: Tuesday, October 27, 2020 1:57 PM > > > > To: Leyi Rong ; qi.z.zhang@intel.com; > > > > bruce.richardson@intel.com; wenzhuo.lu@intel.com; Ali Alnubani > > > > ; Andrew Rybchenko > > ; > > > > David Marchand > > > > Cc: dev@dpdk.org > > > > Subject: Re: [PATCH] net/ice: add AVX512BW flag check both in build > > > > and runtime > > > > > > > > On 10/27/2020 10:19 AM, Leyi Rong wrote: > > > > > Intrinsic function __mm512_bsrli_epi128 should be used in the > > > > > environment which supports AVX512BW, so adds check for this flag. > > > > > > > > > > Fixes: 5dd3b8f3af34 ("net/ice: add AVX512 vector path") > > > > > > > > > > Signed-off-by: Leyi Rong > > > > > > > > Squashed into relevant commit in next-net, thanks. > > > > > > > > > > > > Andrew, Ali, David, > > > > > > > > Can you please confirm the issue is solved in the next-net/main? > > > > > > > > > > The build failures in CentOS 7, Ubuntu 18.04 and in OpenSUSE Leap 15.2 no > > longer reproduce. But we just noticed that Ubuntu 16.04.7 (gcc 5.4.0) is also > > failing with a different error: > > > > > > """ > > > drivers/net/ice/ice_rxtx_vec_avx512.c:1:0: error: bad value > > > (skylake-avx512) for -march= switch > > > /* SPDX-License-Identifier: BSD-3-Clause """ > > > Which is also caused by "net/ice: add AVX512 vector path". > > > > > > > I think we can drop the -march=skylake-avx512 flag in the build command for > > the avx512 file, since specifying the -mavx512f and -mavx512bw should be > > enough. Testing in an ubuntu 16.04 VM (which has 5.5 rather than 5.4 > > compiler, but should be ok), shows that the avx512 instruction set flags are > > recognised and enable the isntructions, which the -march one is not. > > > > /Bruce > > > > bruce@ubuntu-1604-vm:~$ gcc -mavx512f -mavx512bw -dM -E - < /dev/null > > | grep AVX #define __AVX512F__ 1 #define __AVX512BW__ 1 #define > > __AVX__ 1 #define __AVX2__ 1 bruce@ubuntu-1604-vm:~$ gcc - > > march=skylake-avx512 -dM -E - < /dev/null | grep AVX > > cc1: error: bad value (skylake-avx512) for -march= switch > > Hi Bruce, > > Drop -march=skylake-avx512 really impact the throughput performance in my test, although -avx512f and -avx512bw are set meanwhile. We need to find out why this is, since it really should not matter? We should be used the instruction set flags to turn on features rather than relying on a particular CPU architecture. Can you try turning on the other features present in "skylake-avx512" and see if that makes a difference. For reference, they are avx512vl, avx512cd and avx512dq. gcc -march=skylake-avx512 -dM -E - < /dev/null | grep AVX5 #define __AVX512F__ 1 #define __AVX512BW__ 1 #define __AVX512VL__ 1 #define __AVX512CD__ 1 #define __AVX512DQ__ 1 > Could we add a judgement before setting -march=skylake-avx512, the judgement can just like > if (toolchain == 'gcc' and cc.version().version_compare('>=7.0.0')) > We should never check for a specific compiler. Instead check for the compiler flag directly. /Bruce