From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v6] eal/x86: add 128-bit atomic compare exchange Date: Thu, 4 Apr 2019 13:52:12 +0100 Message-ID: References: <20190403193541.28044-1-thomas@monjalon.net> <3359378.XCyAA4UgPl@xps> <9184057F7FC11744A2107296B6B8EB1E54210CC8@FMSMSX108.amr.corp.intel.com> <2748440.W4LoRDhJ5f@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Shahaf Shuler , Matan Azrad , Yongseok Koh , "dev@dpdk.org" , "olivier.matz@6wind.com" , "arybchenko@solarflare.com" , "Richardson, Bruce" , "Ananyev, Konstantin" , "gavin.hu@arm.com" , "Honnappa.Nagarahalli@arm.com" , "nd@arm.com" , "chaozhu@linux.vnet.ibm.com" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" To: Thomas Monjalon , "Eads, Gage" Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5175C1B438 for ; Thu, 4 Apr 2019 14:52:17 +0200 (CEST) In-Reply-To: <2748440.W4LoRDhJ5f@xps> Content-Language: en-US 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 4/4/2019 1:18 PM, Thomas Monjalon wrote: > 04/04/2019 14:14, Eads, Gage: >> From: Thomas Monjalon [mailto:thomas@monjalon.net] >>> 04/04/2019 14:08, Thomas Monjalon: >>>> 04/04/2019 13:47, Ferruh Yigit: >>>>> .../dpdk/x86_64-native-linuxapp-gcc/include/rte_atomic_64.h:223:3: >>>>> error: ISO C does not support ‘__int128’ types [-Werror=pedantic] >>>> >>>> We can try this kind of workaround (disable pedantic locally): >>>> >>> https://github.com/HowardHinnant/date/pull/38/commits/177032852d5b46 >>> 14 >>>> 112ca1ab3ef42d6b41824816 >>> >>> Or better: >>> __extension__ typedef __int128 int128; >>> >> >> Taking that one step further -- RTE_STD_C11 evaluates to __extension__ (when the STD C version is sufficiently old). > > I don't think __int128 is part of C11. Is it? > > Ferruh, I cannot reproduce the compiler error. What is your compiler? > Please, could you test this patch? It is gcc [1]. Sure will test it. [1] gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) > > --- a/lib/librte_eal/common/include/arch/x86/rte_atomic_64.h > +++ b/lib/librte_eal/common/include/arch/x86/rte_atomic_64.h > @@ -220,7 +220,7 @@ typedef struct { > RTE_STD_C11 > union { > uint64_t val[2]; > - __int128 int128; > + __extension__ __int128 int128; > }; > } __rte_aligned(16) rte_int128_t; > > >