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 AF531A0C47; Thu, 13 May 2021 06:50:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3766B4067E; Thu, 13 May 2021 06:50:00 +0200 (CEST) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id 39F0E4003F for ; Thu, 13 May 2021 06:49:58 +0200 (CEST) Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FgfKX4CdBzmVbC; Thu, 13 May 2021 12:47:44 +0800 (CST) Received: from [127.0.0.1] (10.40.190.165) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Thu, 13 May 2021 12:49:52 +0800 To: Honnappa Nagarahalli , Jerin Jacob , =?UTF-8?Q?Juraj_Linke=c5=a1?= CC: "thomas@monjalon.net" , Ferruh Yigit , dpdk-dev , "jerinj@marvell.com" , Ruifeng Wang , Jan Viktorin , "Richardson, Bruce" , nd References: <1620808126-18876-1-git-send-email-fengchengwen@huawei.com> <1620808126-18876-2-git-send-email-fengchengwen@huawei.com> From: fengchengwen Message-ID: <664e739b-c904-96a3-584b-1a1b1546f1e9@huawei.com> Date: Thu, 13 May 2021 12:49:51 +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: 8bit X-Originating-IP: [10.40.190.165] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH 1/2] config/arm: add non-SVE march for soc kunpeng930 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/13 7:00, Honnappa Nagarahalli wrote: > > >> >> On Wed, May 12, 2021 at 2:01 PM Chengwen Feng >> wrote: >>> >>> Currently, the soc_kunpeng930 declares '-march=armv8.2-a+crypto+sve', >>> but some compiler doesn't recognize the march because it doesn't >>> support sve. >> >> Agree with the problem statement. >> >> + @Juraj Linkeš >> >>> >>> This patch adds '-march=armv8.2-a+crypto' before >>> '-march=armv8.2-a+crypto+sve' so that: >>> 1. If compiler doesn't support '-march=armv8.2-a+crypto+sve', then it >>> will fallback supports 'armv8.2-a+crypto'. >>> 2. If compiler supports '-march=armv8.2-a+crypto+sve', then it will >>> compile SVE-related code. >>> >>> Fixes: 7cf32a22b240 ("config/arm: add Hisilicon kunpeng") >>> >>> Signed-off-by: Chengwen Feng >>> --- >>> config/arm/meson.build | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/config/arm/meson.build b/config/arm/meson.build index >>> 3f34ec9..fe6c29b 100644 >>> --- a/config/arm/meson.build >>> +++ b/config/arm/meson.build >>> @@ -158,7 +158,7 @@ implementer_hisilicon = { >>> ] >>> }, >>> '0xd02': { >>> - 'machine_args': ['-march=armv8.2-a+crypto+sve'], >>> + 'machine_args': ['-march=armv8.2-a+crypto', >>> + '-march=armv8.2-a+crypto+sve'], >> >> I think, this problem not specific to Kunpeng. I think, in order to have a generic >> solution, I think, we need to express something like [[armv8.2-a], [crypto], >> [sve]] or so in the code and any infra code can generate a working >> combination to avoid duplicating the combination manually in code and have >> some generic solution for all the platforms. > I think this approach will be too generic. We have to start with v8.0 (as the compiler might not support v8.2-a) and list every feature and check if all those features are supported in the compiler. It might be required that some features might not perform well in certain applications which requires for disabling the features. > > I think tweaks like this should be left to the end user. > Agree Fixed in v2 (separate -march='armv8.2-a+crypto+sve' to two tuples, namely: march_base and march_feature), thanks >> >> i.e >> patch 1: Enable the infrastructure for auto probe based on compiler support. >> patch 2: Fix existing machines including the Kunpeng. >> >> >>> 'flags': [ >>> ['RTE_MACHINE', '"Kunpeng 930"'], >>> ['RTE_ARM_FEATURE_ATOMICS', true], >>> -- >>> 2.8.1 >>>