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 0A302A050B; Wed, 4 May 2022 08:30:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A33BB4069F; Wed, 4 May 2022 08:30:09 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C6FE040694 for ; Wed, 4 May 2022 08:30:07 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 1DB9220EB0D2; Tue, 3 May 2022 23:30:07 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1DB9220EB0D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1651645807; bh=wpFeDDBNlbwsx0cv254GDQywyLtCipI3iASlEd472WI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bykr40O8csjkCTYCcJdZ5WATTX8STtF0SvQ2YZKPjNLRxWeqf8HiFsmuUQOvTASFd pkWNP0FqLrXUJobPyKes9aq5skAFBkvIGAueflGuV7nyvfdec/Pl/Kwq6CPxb6lk5A tiGaVJffT8AFPVnA/j6AuseWgjbiv5zH9qLJLIZ0= Date: Tue, 3 May 2022 23:30:07 -0700 From: Tyler Retzlaff To: Thomas Monjalon Cc: Bruce Richardson , dev@dpdk.org, David Christensen , Beilei Xing , Matan Azrad , Viacheslav Ovsiienko , Maxime Coquelin , Chenbo Xia , Vladimir Medvedkin Subject: Re: [PATCH] avoid AltiVec keyword vector Message-ID: <20220504063007.GA466@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20220503120321.2438479-1-thomas@monjalon.net> <4591093.jE0xQCEvom@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4591093.jE0xQCEvom@thomas> User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Tue, May 03, 2022 at 05:44:26PM +0200, Thomas Monjalon wrote: > 03/05/2022 14:30, Bruce Richardson: > > On Tue, May 03, 2022 at 02:03:21PM +0200, Thomas Monjalon wrote: > > > The keyword "vector" may conflict easily. > > > As a rule, it is better to use the alternative keyword "__vector". > > I forgot to say that we should #undef vector. > > > hi Thomas, > > > > could you perhaps clarify a bit more in the log, I'm not aware of it being > > a keyword generally. > > https://www.ibm.com/docs/fr/xl-c-and-cpp-linux/latest?topic=support-vector-types > > > What would "vector" conflict with? > > If it's a keyword is it possible to use it as a variable name in these files? > > It conflicts with anything named as "vector" > if you include AltiVec header file. > It is especially a problem when using C++ vector type, > that's why the keyword vector is not defined with C++: > https://github.com/gcc-mirror/gcc/blob/master/gcc/config/rs6000/altivec.h#L45 > > The workaround is to #undef vector after including altivec.h, > or directly in rte_altivec.h (with a compatibility breakage). > In any case we should use only __vector keyword to allow such #undef. > +1 please use __vector it is appropriate and the namespace defined for the implementation. we should make as much effort as possible to avoid contamination of the application namespace.