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 BF706A0547; Wed, 19 May 2021 15:35:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4430940041; Wed, 19 May 2021 15:35:18 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id C178A4003F for ; Wed, 19 May 2021 15:35:15 +0200 (CEST) Received: from dggems704-chm.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FlYh83Mn1z1BP0k; Wed, 19 May 2021 21:32:24 +0800 (CST) Received: from dggpeml500024.china.huawei.com (7.185.36.10) by dggems704-chm.china.huawei.com (10.3.19.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 19 May 2021 21:35:10 +0800 Received: from [127.0.0.1] (10.40.190.165) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 19 May 2021 21:35:10 +0800 To: David Marchand CC: Ferruh Yigit , Honnappa Nagarahalli , "thomas@monjalon.net" , "dev@dpdk.org" , "jerinj@marvell.com" , Ruifeng Wang , "viktorin@rehivetech.com" , "bruce.richardson@intel.com" , "jerinjacobk@gmail.com" , "juraj.linkes@pantheon.tech" , nd References: <1620808126-18876-1-git-send-email-fengchengwen@huawei.com> <1620986039-29475-1-git-send-email-fengchengwen@huawei.com> <1620986039-29475-3-git-send-email-fengchengwen@huawei.com> <394de3ea-f0ba-a5a3-e751-be04f479281d@intel.com> <6a61d582-ca9b-42bf-9a5a-b0f106919f25@huawei.com> From: fengchengwen Message-ID: <5862ef1a-eff7-5bd3-fdd0-85f6b90a6680@huawei.com> Date: Wed, 19 May 2021 21:35:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.40.190.165] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v5 2/2] net/hns3: refactor SVE code compile method 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 2021/5/19 20:37, David Marchand wrote: > On Wed, May 19, 2021 at 2:17 PM fengchengwen wrote: >> We also found compile error with gcc8.3 with arm64_kunpeng930_linux_gcc (-march=-march=armv8.2-a+crypto+sve): >> In file included from ../dpdk-next-net/lib/eal/common/eal_common_options.c:38: >> ../dpdk-next-net/lib/eal/arm/include/rte_vect.h:13:10: fatal error: arm_sve.h: No such file or directory >> #include >> ^~~~~~~~~~~ >> compilation terminated. >> [126/2250] Compiling C object lib/librte_net.a.p/net_rte_net_crc.c.o >> >> the corresponding code: >> #ifdef __ARM_FEATURE_SVE >> #include >> #endif >> >> this is because gcc8.3 defined __ARM_FEATURE_SVE but it can't compile ACLE SVE code. > > Afaiu, gcc 8.3 does not define __ARM_FEATURE_SVE: > > $ aarch64-linux-gnu-gcc --version > aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture > 8.3-2019.03 (arm-rel-8.36)) 8.3.0 > Copyright (C) 2018 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > > $ aarch64-linux-gnu-gcc - -pipe -E -P -D_FILE_OFFSET_BITS=64 -P -O0 > -march=armv8-a+crc <> #ifndef __ARM_FEATURE_SVE >> # define __ARM_FEATURE_SVE >> #endif >> "MESON_GET_DEFINE_DELIMITER" >> __ARM_FEATURE_SVE >> EOF > "MESON_GET_DEFINE_DELIMITER" > > You should add sve in '-march' parameter, the same gcc version's output: ./aarch64-linux-gnu-gcc --version aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ./aarch64-linux-gnu-gcc -march=armv8.2-a+sve -dM -E - &1 | grep SVE #define __ARM_FEATURE_SVE 1 #define __ARM_FEATURE_SVE_BITS 0 ./aarch64-linux-gnu-gcc -march=armv8-a+sve -dM -E - &1 | grep SVE #define __ARM_FEATURE_SVE 1 #define __ARM_FEATURE_SVE_BITS 0