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 321B5A0546; Tue, 25 May 2021 08:02:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97B7F4003F; Tue, 25 May 2021 08:02:16 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70070.outbound.protection.outlook.com [40.107.7.70]) by mails.dpdk.org (Postfix) with ESMTP id 676DF4003E for ; Tue, 25 May 2021 08:02:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rWFrXNX0nI8gmNldQRhQMq7kH1wuPe38e5sL8AoS6PI=; b=qdXupx0ks9UrsjvuHGsARisiByG/lnez9RACLOVIRrTP6/puHusQQlycXhIxiXy6qVHMgFNxQyFtW2qkTh3dTKv2IoJaeSZgmOTlnvT6wB+1t0Tz6wYcDoLFwuafVftHrk8yIosIbZSQbzakJ1Mj1hv0OC/e0qmwJKTZX8piPHQ= Received: from MR1P264CA0039.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:3e::31) by AM4PR0802MB2132.eurprd08.prod.outlook.com (2603:10a6:200:5a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27; Tue, 25 May 2021 06:02:12 +0000 Received: from VE1EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:501:3e:cafe::24) by MR1P264CA0039.outlook.office365.com (2603:10a6:501:3e::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Tue, 25 May 2021 06:02:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT059.mail.protection.outlook.com (10.152.19.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Tue, 25 May 2021 06:02:12 +0000 Received: ("Tessian outbound 6c8a2be3c2e7:v92"); Tue, 25 May 2021 06:02:11 +0000 X-CR-MTA-TID: 64aa7808 Received: from 4b474250c3ed.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7251B43A-729C-4654-8512-A8D8F1A992E1.1; Tue, 25 May 2021 06:02:05 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4b474250c3ed.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 May 2021 06:02:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n3ls6tXKuPlhKmd1dFY1WBiPcfNitwt8AXnFJFbeO89zzprEsR8zTfr64XIDw5BThNNAa+WG/hSnHwKTW17ONgfpBtv41ncUtU2baHSc7MS2MdODuW0n8y5y6yYWhWxaf9zFqIaPAFKdkZmfcQbM5xWuABouQkoazLpTnY9FG2rjGbCcEV7FJM1f+nzHFzB/Nb4iTv8aG29JVFIYLtvCQ7uUljpdGq5v/1vNFFXlBQCLgI3jDByUS7FcNd9zRRX91qHVSbK9vwUh/A4+nTiMrFqsULQzF2ixdzlUHfchgz9nIQlJVbPAW2RrI/HJp305sKIqRKK1unyNZsxzkPYN0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rWFrXNX0nI8gmNldQRhQMq7kH1wuPe38e5sL8AoS6PI=; b=X87cI1IpJ4xgsRLu1Th7YBNMpXGrCb0H9dBD/ZjxhSuNsZuu8VtZ+oYCcOs66trBZckJXKjTSKMrCJHYhmx5YDU8qUoctwTcx1Dw6HXOE7Yy8pk9rmNamj5dFlDHYHKhtUJlQTmtfx60rPQRLzgdKeuYfhig6x/QfLAedZsG9k19NNa9KNewjAxLnBenmYwWzOUjTo7hPy5Atrw6S+KaMlmYyfdxX+yLWUHs18wNFRMENoLpZ9kELnF5yr8htWCi6BTfKdDHhXm797DMZIIFzA9nNojqPwUJp7emvo/tc6PpbzakLq7gKkdLvbi3WKtRVR65F6CCr89cZWstNzu2bw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rWFrXNX0nI8gmNldQRhQMq7kH1wuPe38e5sL8AoS6PI=; b=qdXupx0ks9UrsjvuHGsARisiByG/lnez9RACLOVIRrTP6/puHusQQlycXhIxiXy6qVHMgFNxQyFtW2qkTh3dTKv2IoJaeSZgmOTlnvT6wB+1t0Tz6wYcDoLFwuafVftHrk8yIosIbZSQbzakJ1Mj1hv0OC/e0qmwJKTZX8piPHQ= Received: from AM5PR0802MB2465.eurprd08.prod.outlook.com (2603:10a6:203:9f::22) by AM6PR08MB3014.eurprd08.prod.outlook.com (2603:10a6:209:47::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Tue, 25 May 2021 06:02:03 +0000 Received: from AM5PR0802MB2465.eurprd08.prod.outlook.com ([fe80::e890:2ff8:8cdf:83b2]) by AM5PR0802MB2465.eurprd08.prod.outlook.com ([fe80::e890:2ff8:8cdf:83b2%4]) with mapi id 15.20.4150.027; Tue, 25 May 2021 06:02:02 +0000 From: Ruifeng Wang To: Chengwen Feng , "thomas@monjalon.net" , "ferruh.yigit@intel.com" CC: "dev@dpdk.org" , "bruce.richardson@intel.com" , "vladimir.medvedkin@intel.com" , "viktorin@rehivetech.com" , "jerinj@marvell.com" , nd Thread-Topic: [PATCH v3] build: fix SVE compile error with gcc8.3 Thread-Index: AQHXTeSKYwXBKnfvtEOvKIQHOw20PKrzuuvg Date: Tue, 25 May 2021 06:02:02 +0000 Message-ID: References: <1621495007-28387-1-git-send-email-fengchengwen@huawei.com> <1621562002-10961-1-git-send-email-fengchengwen@huawei.com> In-Reply-To: <1621562002-10961-1-git-send-email-fengchengwen@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 8C20247311BDAE4481125D3E2A52F40B.0 x-checkrecipientchecked: true Authentication-Results-Original: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [203.126.0.113] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 11aa8267-b496-4f79-8c5a-08d91f42a3a4 x-ms-traffictypediagnostic: AM6PR08MB3014:|AM4PR0802MB2132: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:597;OLM:597; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: K8RnDmlRicdkoYvo+Ttozatzuf0l42VXhMdhdmaJlOR3HTHBcO4d8i3+1kKtRjDeYHsAr1XXF002EhZ+m1Bhls6YCy052YQ8PUp+OGCRnfBQKkk5tebGk3EUUwqIg9BlnNcCJQgu2cQUru7VzXCPEGlQvoGKH2FcZ/BsEBPtKz/ALX6pyeYLaNLAVXSkk2xjM8JwoWEf5EcHRpnAlJqWjX/WNrvwb6Cn7aSzx3nBJd0e3vXWvcdGxuup0BPXT49HGUa0QmQp4nE4cp+Q4X1QrpATQy8G75gGVkjqMPIL84SPs77cMUlh5oQ9y7bmix0iTjgkqiygH8X14vE10tuQ7vuWOv3cgb0KIDXl7wLGt/aBfJkW02O6VAunUMrjvcbQHkAradGnAIVPZcK3zUXZOWWnNq03z4t/wUJfsxeUZQl4Ix8XSh8bd4Vpdcxd41NRhYkB2HREYy7Pej2aWnyhFbWER7KiRRc19HWQPvJfiPycyaoRywQrUpqfPS3jEorrmpEQKen5xLA0zWPGCBvbnMGwmR5GzXPhRbuEJvk3t5BwTCvSfZx96u6RfOQvZ+ltw5V2Vp/+zYp7IvtBtp3YYfT5enkbQXMzQbvhTaNnx4Y= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM5PR0802MB2465.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(346002)(366004)(39840400004)(396003)(8676002)(9686003)(53546011)(6506007)(55016002)(66556008)(7696005)(64756008)(478600001)(76116006)(26005)(66476007)(66946007)(66446008)(83380400001)(52536014)(2906002)(110136005)(38100700002)(54906003)(5660300002)(186003)(4326008)(71200400001)(86362001)(33656002)(122000001)(8936002)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?/eLHPi9fIemgWX+pBO57lQcEIVKFsQLHK6UBQ2cEpUs7bmx3ZUqLcp/mDMUl?= =?us-ascii?Q?aWQylSMoReKOo/cc9QWQonDZIgm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q?wnlQDEEn9Npp4J/Ph3OzXd4GHHPeZuTypASd5zYwnDLcym9o1MiFby+BRRo+?= =?us-ascii?Q?wEtsULhhetwoMX5Vvevlry4IJfhNpFm7vVjEq8FsWJhEmRNHC03E4OkKQbU7?= =?us-ascii?Q?njOIuwEt94QUVxfx6VdURbRc/EuaGAGW/NmuWoHyqLU3NOca8YFK8BdOYHzF?= =?us-ascii?Q?ZvH03nnyG7WGb34ec4kvIylOG8vYbV5Vn/oFEDJcjotCZHWrBHYjJ7u1C6YD?= =?us-ascii?Q?uFhChPFh7mrzR3LzIZkYnxv7FzsnFv5Vbe6TGoD4iA66JSOAZARJEFUDviMY?= =?us-ascii?Q?h8fTWYV+eQ84EVANa5DJZOOv+bB87K8t2kle5C5/Q25U0AWRdXjUPiQmxJvD?= =?us-ascii?Q?amtlGdeMrxYGKycwsRjwB7pQ?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3014 Original-Authentication-Results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 30449c0f-959f-4eac-edac-08d91f429e05 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zzheM+1OP5SLPIa3qmQxd/ZlfMpWktS2l5ud6N8iCwIBVE4R+KawPwng7GZMIyntcukupNYbqz8OTqr8h3CEk5YIPZjJHlwvHFmPYa5hafj/Vj6KTOzcpXstyPRbjdEAkYSxdYmEz8MSc5KaxYT35u5RsggkeQprtjgs8pJMEwQCdqcLlWkyQoBjtqvrcqRAE0ovK3z+bDtegxdbOl5l4clV5dfvDX1Pxp+3jYXBae5jVypgDf8uKPxkj3oX2DJ26zq9mwGI1PuNg8pojmvbsT0qICyDJXJn1RPMmbLuPsehX6QGZQe2n2DQoSCHtWUDnkeVEskTkYGH74vnhoqBqdX9CaX7dUdobrOPO6LKOuAitR0t52ObWMlnRuoqMb8WXuOYnCkul1rYwmf2/wroOHbzGw0gc1qPitbRyB+Ug1HG212c8MrFBnYk5TOJBn4RFGX4IqQjct1vTmyCJGG/vyk+w3I4jq1Tx2N553KoB+tvq68GIpKwPJ1fk0tcunlfGv8LI3Id6c1UpCjuAQpNpj1EeLXi/sC7BgdSg/lctY2LXHXNrPCe3uS+O6SlhM7Rm/OqVjl7tDr1Y8p9+HwitGhWJiA8b9yhLe0m04DRhtEIYLPqqcUIBp9dGxnwbZqFZ01b3VhEPY/mUeHH6U3wKX1eaLXddH9PlHfTJAx16h0= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(396003)(346002)(136003)(39840400004)(376002)(46966006)(36840700001)(55016002)(53546011)(70586007)(82310400003)(316002)(86362001)(4326008)(6506007)(70206006)(33656002)(2906002)(356005)(478600001)(8936002)(5660300002)(9686003)(8676002)(83380400001)(186003)(47076005)(36860700001)(81166007)(52536014)(336012)(54906003)(7696005)(26005)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2021 06:02:12.2119 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11aa8267-b496-4f79-8c5a-08d91f42a3a4 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2132 Subject: Re: [dpdk-dev] [PATCH v3] build: fix SVE compile error with gcc8.3 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" > -----Original Message----- > From: Chengwen Feng > Sent: Friday, May 21, 2021 9:53 AM > To: thomas@monjalon.net; ferruh.yigit@intel.com; Ruifeng Wang > > Cc: dev@dpdk.org; bruce.richardson@intel.com; > vladimir.medvedkin@intel.com; viktorin@rehivetech.com; > jerinj@marvell.com > Subject: [PATCH v3] build: fix SVE compile error with gcc8.3 >=20 > If the target machine has SVE feature (e.g. "-march=3Darmv8.2-a+sve'), an= d the > compiler are gcc8.3, it will compile error: > 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. >=20 > The root cause is that gcc8.3 supports SVE (the macro __ARM_FEATURE_SVE > was 1), but it doesn't support SVE ACLE [1]. >=20 > The solution: > a) Detect compiler whether support SVE ACLE, if support then define > CC_SVE_ACLE_SUPPORT macro. > b) Use the CC_SVE_ACLE_SUPPORT macro to include SVE header file. >=20 > [1] ACLE: Arm C Language Extensions, the SVE ACLE header file is > , user should include it when writing ACLE SVE code. >=20 > Fixes: 67b68824a82d ("lpm/arm: support SVE") >=20 > Signed-off-by: Chengwen Feng > --- > v3: > * double-indent 'cc.check_header('arm_sve.h')' line > * move set 'CC_SVE_ACLE_SUPPORT' logic to the back (not in the middle > of compile_time_cpuflags setting) > * fix minor syntax error in commit log > v2: > * modify title start with 'build' >=20 > --- > config/arm/meson.build | 5 +++++ > lib/eal/arm/include/rte_vect.h | 2 +- > lib/lpm/rte_lpm.h | 2 +- > 3 files changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/config/arm/meson.build b/config/arm/meson.build index > e83a56e..08299b0 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -488,3 +488,8 @@ if cc.get_define('__ARM_FEATURE_CRYPTO', args: > machine_args) !=3D '' > compile_time_cpuflags +=3D ['RTE_CPUFLAG_AES', 'RTE_CPUFLAG_PMULL', > 'RTE_CPUFLAG_SHA1', 'RTE_CPUFLAG_SHA2'] endif > + > +if (cc.get_define('__ARM_FEATURE_SVE', args: machine_args) !=3D '' and > + cc.check_header('arm_sve.h')) > + dpdk_conf.set('CC_SVE_ACLE_SUPPORT', 1) endif > diff --git a/lib/eal/arm/include/rte_vect.h b/lib/eal/arm/include/rte_vec= t.h > index 093e912..277b656 100644 > --- a/lib/eal/arm/include/rte_vect.h > +++ b/lib/eal/arm/include/rte_vect.h > @@ -9,7 +9,7 @@ > #include "generic/rte_vect.h" > #include "rte_debug.h" > #include "arm_neon.h" > -#ifdef __ARM_FEATURE_SVE > +#ifdef CC_SVE_ACLE_SUPPORT > #include > #endif >=20 > diff --git a/lib/lpm/rte_lpm.h b/lib/lpm/rte_lpm.h index 28b5768..9262814 > 100644 > --- a/lib/lpm/rte_lpm.h > +++ b/lib/lpm/rte_lpm.h > @@ -402,7 +402,7 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t > ip, uint32_t hop[4], > uint32_t defv); >=20 > #if defined(RTE_ARCH_ARM) > -#ifdef __ARM_FEATURE_SVE > +#ifdef CC_SVE_ACLE_SUPPORT > #include "rte_lpm_sve.h" > #else > #include "rte_lpm_neon.h" > -- > 2.8.1 Acked-by: Ruifeng Wang