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 B198BA04B7; Wed, 14 Oct 2020 15:39:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E808D1DE41; Wed, 14 Oct 2020 15:34:31 +0200 (CEST) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id 535831D8F6 for ; Wed, 14 Oct 2020 15:34:29 +0200 (CEST) Received: from HKMAIL102.nvidia.com (Not Verified[10.18.92.77]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 14 Oct 2020 21:34:27 +0800 Received: from HKMAIL103.nvidia.com (10.18.16.12) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 14 Oct 2020 13:34:26 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.177) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 14 Oct 2020 13:34:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bNwhbEDrxTuz4e4sKMMcTh5L2R1YdkqyMX/zKrqC5+ViZn/6e2/OTP+frZxG4Mqyr7EWa6hz7wywGYCg7wzMFFh4sTlHdi/ycPO4jwTxn9KfWLeKFuAW/E/+835tGC1R+ODhYjLSKqK3LQY2FcNU4mzvoS3AQQuem86t+ro8n2Wifcw+w9uAsBRnjm9O/co8TQ7HQR3/8mm4LU87VQYe82hAET7Sc6fjbGsDAVzc8bN5Rl9IYnKV1EXOezP7kuFi51zp8N6/xjPADAScLg2K2+553Z8I97NTdkxj8panfM/bFkNvMn0fAHf+fWorR96Db9aWSnhMtmQAjGe85Y6Gpg== 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=OlDARlO+XdR+oML6nvy3ZToAno1lBsoWxLMlMP79AFk=; b=TDSaPcTfH+79GJJ/oG0fDoVoYgpIkTSsuAsV8PwCc7jtj55inaCgH3il4x2j/+DLTeI+Xm0ysIHfkWOkIeBmAUXREVM+kAa+Qib0avOnicqzt82FaqKDvxpbEJJpONQJ1qKYOsRP0T6DnWPY01Z1MvdQmn7zRz9bKYuNHXEeZPThBJM584KQUEVHhiSk7rbTEsaPqZt3kJ2iZagDbN2lCYEFpOus1r5szMjUovCEy/QQBy+IXv4ft2HHY8PfZWMHffmBplTtd5E5Av2m1DoY2gWAow5igxe+PRHs5gIkiyBu2mX1C5zaLRjXLWMjonW1W+sui6whk2rvPLHHg26A5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM5PR12MB2406.namprd12.prod.outlook.com (2603:10b6:4:b7::23) by DM6PR12MB4123.namprd12.prod.outlook.com (2603:10b6:5:21f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Wed, 14 Oct 2020 13:34:24 +0000 Received: from DM5PR12MB2406.namprd12.prod.outlook.com ([fe80::c806:9c0b:4af5:a686]) by DM5PR12MB2406.namprd12.prod.outlook.com ([fe80::c806:9c0b:4af5:a686%6]) with mapi id 15.20.3455.031; Wed, 14 Oct 2020 13:34:24 +0000 From: Asaf Penso To: Eli Britstein , "dev@dpdk.org" CC: Eli Britstein Thread-Topic: [dpdk-dev] [PATCH] eal: fix build with conflicting libc variable memory_order Thread-Index: AQHWoiHy+eO6LMxzhUyrMY+DO9nsXqmXGP7g Date: Wed, 14 Oct 2020 13:34:24 +0000 Message-ID: References: <20201014061909.9957-1-elibr@nvidia.com> In-Reply-To: <20201014061909.9957-1-elibr@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [217.111.27.204] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9103f307-92b8-46fd-bb10-08d87045dd74 x-ms-traffictypediagnostic: DM6PR12MB4123: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:262; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SXP18oagq1acgimNy0tdJmROL+kuYsPeniU9ajEgqbGdWdb44C4i7IfuFaLXji/uOMedsBzDEkAIXcyTW1kCrJRK3mSzFpm+cjB1tX6bQgzthl0i/vwdc0Rg3uEvNp8V66pBXioM+wniuh1PGvfC23CgdmCeCc2eCtlDd2cellix+U/VHCLOzb+E0oCbefdknNCvdhfkCH1yrJ/O7UiYeDBotevQFA3ytXK4FgYuivDkmwbp6W3LI6Bf2VX/QXOYPfxfM7g1rEAs1Ui6O/KNnxcGkVdNNIWg2q/AqD6mUsnb6/BVhNOhCh15DpxeQSi9zc6AhvLR+bTXfk3hplYWXQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB2406.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(366004)(376002)(396003)(346002)(316002)(76116006)(110136005)(86362001)(5660300002)(9686003)(55016002)(4326008)(55236004)(26005)(107886003)(52536014)(33656002)(478600001)(186003)(83380400001)(6506007)(7696005)(66556008)(66476007)(66446008)(64756008)(2906002)(66946007)(71200400001)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: oC9FaZFFXtmvTiBu7lgIMSXD+hUO9S1VCgYWecMfNt5oqwiaiUVSz6TjeuXGuNCj1WNhXotS3APaDMJb33FViZhfe5hhuKWVfb3yWAAN42+ez0aGW6cWlJDQlyhcSl73rd8tnOduoDve1DhfHXP07QXElOrHTLb4ENjAoF5/kR/G1BzqUbUlFTaw8H9U10ws5GtORBiRrzIQvLh7Y4btRC2rZ50RrTLrhxpXDVeQT/pX6mqbl2XbN9gkiw2e0tOz+707+bDrafU5P+U17jkFmVZ+3JAZHlUzkwn3VsHi4ojiQFTGjlzUMzdDcfg+2ZrRLTSIjfeduUN8CQYfb2WekMzkFnjwBoWVoPMss4/CSZX1CMnEUSXEotLwTLet2He4STTrjee9tcpywLDEpQB3P71R+QWEwry0Jd1/yUzmsmapnjzu2q+vC5Txt2p7egtMKM7fR3LWkE8GAYSD1NVToxaJV6AeAOrdA5uqBaxWrK5sK5hK+xacNcQUa4m2nbl72jUAItzzGOitTtv0wtOpJkIjzRe01fzt5PoYL5mqpFgIizCoEo1/xdGAb8LN4Oc4PsDFPws7AmWYVW2iF1tPpMtXFntxh02YXbTYrU2gmknS8pqmVqq/QlEVMsforRs7Hrq5uOdD6iRw1HBBSnkgVg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB2406.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9103f307-92b8-46fd-bb10-08d87045dd74 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2020 13:34:24.2464 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fcJ/GXjnaDxZPRvKauBNTzFfo/JE1f0Y0DkU/saSo4+ojwl5ISkZ2E21D1aD0MTRIZ5EbqPGB/W45I42NCEItQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4123 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602682467; bh=OlDARlO+XdR+oML6nvy3ZToAno1lBsoWxLMlMP79AFk=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ms-exchange-transport-forked: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:Content-Type: Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=J7I5rIUzIYt18xNH3Ux08zI93g8pPaqM8UtFkm2AG0x2TmFws+SHtou4z10EMoryA EwZzRfx8xhwKEoMGI6D6U/OTU4aV/oUAIB0uDJzHTrVEfRSW+OUofOb0itYnqv+KNK VYUE6Z+FVJyP4Qyf7MBtfg2QSATiyCM/CGgsS8/67TKwdy3bQ9TbY3r9pz0PIl6ayV WukU+DJd4yZqMHUxPMQhQIzVid+l6dtQL8ABNU/6DoSRg6RoTt8sLsBq8Qfw5ibsgn KkH1Z1+H8l1wupO3TWqMZQiboVRTZutwoaW5ytxoRwDzOax+zbHqiNUaMJbIFlDHY5 m5BLdAhhUsMfA== Subject: Re: [dpdk-dev] [PATCH] eal: fix build with conflicting libc variable memory_order 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" >-----Original Message----- >From: dev On Behalf Of Eli Britstein >Sent: Wednesday, October 14, 2020 9:19 AM >To: dev@dpdk.org >Cc: Eli Britstein >Subject: [dpdk-dev] [PATCH] eal: fix build with conflicting libc variable >memory_order > >The cited commit introduced functions with 'int memory_order' argument. >The C11 standard section 7.17.1.4 defines 'memory_order' as the >"enumerated type whose enumerators identify memory ordering >constraints". >Applications that use the standard enum (includes stdatomic.h), will fail >compilation with: >error: declaration of 'memory_order' shadows a global declaration > [-Werror=3Dshadow] > rte_atomic_thread_fence(int memory_order) Fix it by changing the >argument name 'memory_order' to 'memorder'. > >Fixes: 672a15056380 ("eal: add wrapper for C11 atomic thread fence") >Signed-off-by: Eli Britstein Reviewed-by: Asaf Penso >--- > lib/librte_eal/arm/include/rte_atomic_32.h | 4 ++-- >lib/librte_eal/arm/include/rte_atomic_64.h | 4 ++-- >lib/librte_eal/include/generic/rte_atomic.h | 2 +- > lib/librte_eal/ppc/include/rte_atomic.h | 4 ++-- > lib/librte_eal/x86/include/rte_atomic.h | 6 +++--- > 5 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/lib/librte_eal/arm/include/rte_atomic_32.h >b/lib/librte_eal/arm/include/rte_atomic_32.h >index 9d0568d497..fe48ab428e 100644 >--- a/lib/librte_eal/arm/include/rte_atomic_32.h >+++ b/lib/librte_eal/arm/include/rte_atomic_32.h >@@ -34,9 +34,9 @@ extern "C" { > #define rte_io_rmb() rte_rmb() > > static __rte_always_inline void >-rte_atomic_thread_fence(int memory_order) >+rte_atomic_thread_fence(int memorder) > { >- __atomic_thread_fence(memory_order); >+ __atomic_thread_fence(memorder); > } > > #ifdef __cplusplus >diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h >b/lib/librte_eal/arm/include/rte_atomic_64.h >index c518559bc9..20dd6c75dd 100644 >--- a/lib/librte_eal/arm/include/rte_atomic_64.h >+++ b/lib/librte_eal/arm/include/rte_atomic_64.h >@@ -38,9 +38,9 @@ extern "C" { > #define rte_io_rmb() rte_rmb() > > static __rte_always_inline void >-rte_atomic_thread_fence(int memory_order) >+rte_atomic_thread_fence(int memorder) > { >- __atomic_thread_fence(memory_order); >+ __atomic_thread_fence(memorder); > } > > /*------------------------ 128 bit atomic operations --------------------= -----*/ diff -- >git a/lib/librte_eal/include/generic/rte_atomic.h >b/lib/librte_eal/include/generic/rte_atomic.h >index d1255b2d8c..276272f40b 100644 >--- a/lib/librte_eal/include/generic/rte_atomic.h >+++ b/lib/librte_eal/include/generic/rte_atomic.h >@@ -122,7 +122,7 @@ static inline void rte_io_rmb(void); > /** > * Synchronization fence between threads based on the specified memory >order. > */ >-static inline void rte_atomic_thread_fence(int memory_order); >+static inline void rte_atomic_thread_fence(int memorder); > > /*------------------------- 16 bit atomic operations --------------------= -----*/ > >diff --git a/lib/librte_eal/ppc/include/rte_atomic.h >b/lib/librte_eal/ppc/include/rte_atomic.h >index a91989930b..6a7e65210c 100644 >--- a/lib/librte_eal/ppc/include/rte_atomic.h >+++ b/lib/librte_eal/ppc/include/rte_atomic.h >@@ -37,9 +37,9 @@ extern "C" { > #define rte_io_rmb() rte_rmb() > > static __rte_always_inline void >-rte_atomic_thread_fence(int memory_order) >+rte_atomic_thread_fence(int memorder) > { >- __atomic_thread_fence(memory_order); >+ __atomic_thread_fence(memorder); > } > > /*------------------------- 16 bit atomic operations --------------------= -----*/ diff -- >git a/lib/librte_eal/x86/include/rte_atomic.h >b/lib/librte_eal/x86/include/rte_atomic.h >index b7d6b06ddf..915afd9d27 100644 >--- a/lib/librte_eal/x86/include/rte_atomic.h >+++ b/lib/librte_eal/x86/include/rte_atomic.h >@@ -87,12 +87,12 @@ rte_smp_mb(void) > * used instead. > */ > static __rte_always_inline void >-rte_atomic_thread_fence(int memory_order) >+rte_atomic_thread_fence(int memorder) > { >- if (memory_order =3D=3D __ATOMIC_SEQ_CST) >+ if (memorder =3D=3D __ATOMIC_SEQ_CST) > rte_smp_mb(); > else >- __atomic_thread_fence(memory_order); >+ __atomic_thread_fence(memorder); > } > > /*------------------------- 16 bit atomic operations --------------------= -----*/ >-- >2.28.0.546.g385c171