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 4B758A0A0A; Thu, 20 May 2021 10:18:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B617E40143; Thu, 20 May 2021 10:18:06 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80074.outbound.protection.outlook.com [40.107.8.74]) by mails.dpdk.org (Postfix) with ESMTP id DF8F740041 for ; Thu, 20 May 2021 10:18:05 +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=ApD8auy5bu4fPdihKMhEYnacRoSE4Qj+A8IPxODUVRo=; b=+BbIbu7kWEewBYr76epjM4/W5h0cFSDu99qAd2Les/rxTsyGTtiTSTlViW5O/j3IlnlFQS0Lpgk9a39gCMtfHkwBwMvloOXQw2JAkb4FnQ4Ic7CfrJOt61C+CYx1zfKeO0Klra4vzWtPSut81MIpi2fTL0vLaz6Bd6o4QtO3s28= Received: from AS8P251CA0019.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::22) by AM6PR08MB4850.eurprd08.prod.outlook.com (2603:10a6:20b:d2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Thu, 20 May 2021 08:18:04 +0000 Received: from AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2f2:cafe::fd) by AS8P251CA0019.outlook.office365.com (2603:10a6:20b:2f2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Thu, 20 May 2021 08:18:04 +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 AM5EUR03FT064.mail.protection.outlook.com (10.152.17.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Thu, 20 May 2021 08:18:03 +0000 Received: ("Tessian outbound 3c287b285c95:v92"); Thu, 20 May 2021 08:18:03 +0000 X-CR-MTA-TID: 64aa7808 Received: from f60586d53fb0.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3EC7DDFB-8198-464C-8681-BD881DBC198B.1; Thu, 20 May 2021 08:17:57 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f60586d53fb0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 20 May 2021 08:17:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dMi7fTr99Wnmj306cHdIhjZXN7YigHrZ4QB9L9/+YufZpdGHRmGswqJH5pEWJQvBxm0YAcQQyYPuknRidbQflu7PanKQmNVve0RBiy67N8SQKrBTsU73pJWecRkTv//3xnCKqT5Q95Jdno6wVim8IUgTENDeeZ9vJuf8AtEFJAZhCnIMcJQxaodAjjSnOHKt1Y9hAkjuar0A/zaMOnePhcDgF6X3K7+OKEFiXyX+CcWWo8dAVC+u9g8dd413jmIKDQsdS3G5KO2C9sk5yjJ3582o+ZbG9BrHgTUVMs+BEUnQ1WHgrmz2SSw+k59AUC0o+T3q5dVVYbTk41KBJ8DaKg== 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=ApD8auy5bu4fPdihKMhEYnacRoSE4Qj+A8IPxODUVRo=; b=YIuxZuXPxgdICSI3uA1x9Eg11EZEtrzdsDXV98NhHLnesAbVx1Fe4qpKbE4dpvy2516yCiNv47dq0nq2a/iPXEnOzYGu1UWl2kLVypUVPZBACD9R+NO/yz0b3bGbujrXyCbYXl8gfmQky50upbZs9KAGBxS/I+giRyOQGV56OBcHT7fanJQNU9nhxmCl9Jzi1LaVGr875YNqkPh52oaJb8VXA1J69nfGKNvZj8LNpAzcHvNIGm8EypeX140w3+8Ouk7oOOUekfQgcRPXwXVHZAMHksBgaZWYofN/+Kd62sTPqADFWXpuJDRRPjQPpzg1Cthlj+z/7+r+7BLnAgm81g== 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=ApD8auy5bu4fPdihKMhEYnacRoSE4Qj+A8IPxODUVRo=; b=+BbIbu7kWEewBYr76epjM4/W5h0cFSDu99qAd2Les/rxTsyGTtiTSTlViW5O/j3IlnlFQS0Lpgk9a39gCMtfHkwBwMvloOXQw2JAkb4FnQ4Ic7CfrJOt61C+CYx1zfKeO0Klra4vzWtPSut81MIpi2fTL0vLaz6Bd6o4QtO3s28= Received: from AM5PR0802MB2465.eurprd08.prod.outlook.com (2603:10a6:203:9f::22) by AM6PR08MB3750.eurprd08.prod.outlook.com (2603:10a6:20b:81::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.27; Thu, 20 May 2021 08:17:55 +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.4129.032; Thu, 20 May 2021 08:17:55 +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] lpm/arm: fix SVE compile error with gcc8.3 Thread-Index: AQHXTUiVb6zGwP9lxkGSjLH9zz5IS6rsA4jQ Date: Thu, 20 May 2021 08:17:55 +0000 Message-ID: References: <1621495007-28387-1-git-send-email-fengchengwen@huawei.com> In-Reply-To: <1621495007-28387-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: 282BDCBD62975E40B6CA74DCACABE619.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: d9e69033-409c-4153-9763-08d91b67ca4d x-ms-traffictypediagnostic: AM6PR08MB3750:|AM6PR08MB4850: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 1XWPH6Qe9v8+f7tj+ROI80Zm6sBBHVJC2bQyB5Yd7okZXi3bLrzOu4Ux0KX1UR3YFkXnK+qoXw9sqAWbhronPdWYApcGsFKhiXyoJaITAne0T8jE8SUZX+IIHiHw1QAJGRl6XS/UyU8re4YqLmT36tSk3XPt/0oeTmltdNwvNdQk+aRq/bnBb4Mx//5ZsBx31VOCVdqOSaJA1WsyujaWD+qPb2n5gfOyIfp4E9I2MIdiD6RK/yRLJjIK30OkaB6Zh+fAEg9LVF6SltApQvTeB4qUMmcPoOMgSXNTcmO2QmE0TgiaYqnvJaJIUQ/uq7+P/UaxVw1KHW2vGj5VM2YZZ5Ym7ZH0w2vZEf2GEl9dmttH7DvpDSlsISf8ufd+ek4Z0HXdQntckIcmYxo60lVAG9/MXBSn8HVX5/2Wi4Ucx000W1FwVuK6UY6YpljP0wLFtQjv1eyPrZE65nDOBh30eHKeokW+zpEw2sFsMGMyyLEFKUxMYoVrburOIbZ0id7ScfwlV0sZjLQ8mF3Lk1SySRA7yI9FcTt0GbVqlmrE9sxVUoqLl72FN+8S5fUV0ze4rs6xYyQwJgVX33aaPFM3W9hRMRdlHdG7YuN6NLzP794= 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)(346002)(376002)(396003)(366004)(39860400002)(136003)(76116006)(38100700002)(122000001)(83380400001)(8936002)(33656002)(26005)(4326008)(5660300002)(2906002)(54906003)(7696005)(52536014)(86362001)(316002)(9686003)(66556008)(110136005)(55016002)(66476007)(66946007)(71200400001)(53546011)(64756008)(6506007)(66446008)(186003)(8676002)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Ut1RC50QBvejUR9xbp+LqpoSbEKj1hUkD+/km4g5PLl3nSYYyVTHeiAgeYr6?= =?us-ascii?Q?Y/rvIYGQEYqCIA/hhi6ZZ/6wjQV02G2uVl/JkSciSR7Cw525TnKXSz27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lvAgZh7J/3PlUbY6JKMODUPPHn+Hp?= =?us-ascii?Q?P9EAT1UCnvRP9JTOKuj5Ut3Noxb7kdy5g3esZwZp+Bufjz1SQWJz9w2cMB4H?= =?us-ascii?Q?f+fIG4v0i0r5nr8Q2qdKgdYJEZuHkFLf/83rE1PiaRgsLO04co0J5dVaB0Ww?= =?us-ascii?Q?eBA32VEhG+Z8dgXUw7yaeP3iJ/tptbFKrDiYIF58lAlrXDv131wgN72+n8os?= =?us-ascii?Q?CmLXnN/0Gbkr5X3x1U+IGjIu6UqgDBke97LHTRynUfwzJT4hqaMWS8xp5TF0?= =?us-ascii?Q?+fEsFhMtDpAmvzkl06sKyEeSiQw+AhnQL61QWGrMhw2KokMGwFg2+4HOQR52?= =?us-ascii?Q?RDWTuGl/Y0cX5E7eJHK3kxbF?= 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: AM6PR08MB3750 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: AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5e758f38-9a0e-436e-befd-08d91b67c563 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JgDWHHXVOn2qN7BRWBLwvzksJG7fvojtRdyfv5arQKitLXtCC0UY7+crMoLh3yIRYEYsZ6D+wCDgJH2aqWug8+Pf7xxHsB/KYflcRm/FtWpWpy+T9NjrwJjjLHZyLMugllVL49oZOZLgBUr6/2gKiKeLt+MRUhNHQvNhrKOpIVdnpsbcn6NLFkWxy54zpLn91xPBJr7JL+9EhBaAxZ6oR4HdhC7FNab/YJZVCX9UAxssAs3lp5mjD2Gv772accDXl34QycE5yMIbqObEdIH9bNAMzPfWVSy/u/DjV8pHR6pn6CGdW88TuUb5/cSoz2n9ivXaghmnVm455gOUeeaEBCU/6B8oHWqwcP1uON3sfhl5kmrfZuKfoT73s5DUDFlOeqEcByYEVgtif18u1eHv9XX0EAhMeUYmDev9A9u99de6g9AQrRrc1nafRa0Z+zXsmzE9FiCpxCe3N4dZRgNAzUCGDuK0x8LRdGxL/DA7pu9RYcOJe1yd1oHZxnrDGkJwTLzwqHTm5jft6NAzeHU/tL2ZlWCSoicLTtgBa/x4gMUDI5vflbI6G8/kS6otNRZGs8KegOByEjdaL9fRZg0DQjAT0qTXtrl2EFg7/LclYVow8QVkrX2pYKERjPj+ppZn8GJON0P/ehbUSdFSJY7Id3dl3NMDHIOJ4hHsyWnlsmw= 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)(376002)(346002)(39860400002)(136003)(396003)(36840700001)(46966006)(55016002)(186003)(9686003)(4326008)(478600001)(356005)(70206006)(86362001)(70586007)(26005)(8676002)(82740400003)(47076005)(53546011)(82310400003)(6506007)(7696005)(110136005)(2906002)(36860700001)(81166007)(8936002)(33656002)(54906003)(336012)(83380400001)(5660300002)(52536014)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2021 08:18:03.8730 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9e69033-409c-4153-9763-08d91b67ca4d 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: AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4850 Subject: Re: [dpdk-dev] [PATCH] lpm/arm: 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" Thanks for this patch. Minor comment below. > -----Original Message----- > From: Chengwen Feng > Sent: Thursday, May 20, 2021 3:17 PM > To: thomas@monjalon.net; ferruh.yigit@intel.com > Cc: dev@dpdk.org; bruce.richardson@intel.com; > vladimir.medvedkin@intel.com; viktorin@rehivetech.com; Ruifeng Wang > ; jerinj@marvell.com > Subject: [PATCH] lpm/arm: fix SVE compile error with gcc8.3 This is build fix and not specific to lpm. Use 'build:' instead of 'lpm/arm:'? >=20 > If the target machine has SVE feature (e.g. "-march=3Darmv8.2-a+sve'), an= d the > compiler is 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 support 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 > --- > 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..bff70e4 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -480,6 +480,11 @@ if (cc.get_define('__ARM_NEON', args: > machine_args) !=3D '' or > compile_time_cpuflags +=3D ['RTE_CPUFLAG_NEON'] endif >=20 > +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 > + > if cc.get_define('__ARM_FEATURE_CRC32', args: machine_args) !=3D '' > compile_time_cpuflags +=3D ['RTE_CPUFLAG_CRC32'] endif diff --git > a/lib/eal/arm/include/rte_vect.h b/lib/eal/arm/include/rte_vect.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