Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-04-16 Thread Tyler Retzlaff
On Tue, Apr 13, 2021 at 03:35:53PM +0200, Thomas Monjalon wrote: > 24/03/2021 05:26, Tyler Retzlaff: > > --- a/lib/librte_eal/include/rte_common.h > > +++ b/lib/librte_eal/include/rte_common.h > > @@ -31,9 +31,11 @@ extern "C" { > > #define typeof __typeof__ > > #endif > > > > +#ifndef __cplusp

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-04-13 Thread Thomas Monjalon
24/03/2021 05:26, Tyler Retzlaff: > --- a/lib/librte_eal/include/rte_common.h > +++ b/lib/librte_eal/include/rte_common.h > @@ -31,9 +31,11 @@ extern "C" { > #define typeof __typeof__ > #endif > > +#ifndef __cplusplus > #ifndef asm > #define asm __asm__ > #endif > +#endif Applied with this

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-04-13 Thread Thomas Monjalon
25/03/2021 19:50, Tyler Retzlaff: > On Thu, Mar 25, 2021 at 09:00:54AM +0100, Thomas Monjalon wrote: > > 25/03/2021 01:09, Tyler Retzlaff: > > > On Thu, Mar 25, 2021 at 01:41:47AM +0300, Dmitry Kozlyuk wrote: > > > > 2021-03-24 14:55 (UTC-0700), Tyler Retzlaff: > > > > > > > > Can't speak for Seas

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-25 Thread Tyler Retzlaff
On Thu, Mar 25, 2021 at 09:00:54AM +0100, Thomas Monjalon wrote: > 25/03/2021 01:09, Tyler Retzlaff: > > On Thu, Mar 25, 2021 at 01:41:47AM +0300, Dmitry Kozlyuk wrote: > > > 2021-03-24 14:55 (UTC-0700), Tyler Retzlaff: > > > > > > Can't speak for Seastar and Click, but we never hit this particula

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-25 Thread Thomas Monjalon
25/03/2021 01:09, Tyler Retzlaff: > On Thu, Mar 25, 2021 at 01:41:47AM +0300, Dmitry Kozlyuk wrote: > > 2021-03-24 14:55 (UTC-0700), Tyler Retzlaff: > > > > Can't speak for Seastar and Click, but we never hit this particular issue. > > What is the minimal complete example to reproduce? > > intere

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Tyler Retzlaff
On Thu, Mar 25, 2021 at 01:41:47AM +0300, Dmitry Kozlyuk wrote: > 2021-03-24 14:55 (UTC-0700), Tyler Retzlaff: > > Can't speak for Seastar and Click, but we never hit this particular issue. > What is the minimal complete example to reproduce? interesting, i did a bit more digging and it is clear

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Dmitry Kozlyuk
2021-03-24 14:55 (UTC-0700), Tyler Retzlaff: > On Wed, Mar 24, 2021 at 06:52:40PM +0100, Thomas Monjalon wrote: > > 24/03/2021 18:28, Tyler Retzlaff: [...] > > > would you prefer that i change the preprocessor protection to include only > > > windows? since i'm certain that this will break for an

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Tyler Retzlaff
On Wed, Mar 24, 2021 at 12:52:28PM -0700, Stephen Hemminger wrote: > On Wed, 24 Mar 2021 18:52:40 +0100 > Thomas Monjalon wrote: > > There should be some test for C++ application use of API. > There doesn't appear to be one in the current CI suite. agreed, would probably catch a few things. prob

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Tyler Retzlaff
On Wed, Mar 24, 2021 at 06:52:40PM +0100, Thomas Monjalon wrote: > 24/03/2021 18:28, Tyler Retzlaff: > > > > so to qualify. you mean maybe it is breaking compilation of c++ in a > > compiler that explicitly violates c++ standard when compiling c++? that > > would mean it is not a c++ compiler. >

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Stephen Hemminger
On Wed, 24 Mar 2021 18:52:40 +0100 Thomas Monjalon wrote: > 24/03/2021 18:28, Tyler Retzlaff: > > On Wed, Mar 24, 2021 at 06:04:08PM +0100, Thomas Monjalon wrote: > > > 24/03/2021 17:45, Tyler Retzlaff: > > > > > > I understood this part. > > > > > > My question is more about the reason for h

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Thomas Monjalon
24/03/2021 18:28, Tyler Retzlaff: > On Wed, Mar 24, 2021 at 06:04:08PM +0100, Thomas Monjalon wrote: > > 24/03/2021 17:45, Tyler Retzlaff: > > > > I understood this part. > > > > My question is more about the reason for having this define. > > I think it is there because some compilers don't have

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Tyler Retzlaff
On Wed, Mar 24, 2021 at 06:04:08PM +0100, Thomas Monjalon wrote: > 24/03/2021 17:45, Tyler Retzlaff: > > I understood this part. > > My question is more about the reason for having this define. > I think it is there because some compilers don't have asm keyword, > but have __asm__. And maybe that

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Thomas Monjalon
24/03/2021 17:45, Tyler Retzlaff: > On Wed, Mar 24, 2021 at 09:30:58AM +0100, Thomas Monjalon wrote: > > 24/03/2021 05:26, Tyler Retzlaff: > > > +#ifndef __cplusplus > > > #ifndef asm > > > #define asm __asm__ > > > #endif > > > +#endif > > > > It requires more explanations. > > Which compilers

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Tyler Retzlaff
On Wed, Mar 24, 2021 at 09:30:58AM +0100, Thomas Monjalon wrote: > 24/03/2021 05:26, Tyler Retzlaff: > > +#ifndef __cplusplus > > #ifndef asm > > #define asm __asm__ > > #endif > > +#endif > > It requires more explanations. > Which compilers do not define asm? > What happens with C++ if asm is

Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-24 Thread Thomas Monjalon
24/03/2021 05:26, Tyler Retzlaff: > +#ifndef __cplusplus > #ifndef asm > #define asm __asm__ > #endif > +#endif It requires more explanations. Which compilers do not define asm? What happens with C++ if asm is undefined?

[dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro

2021-03-23 Thread Tyler Retzlaff
From: Tyler Retzlaff Signed-off-by: Tyler Retzlaff --- lib/librte_eal/include/rte_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h index 1b630baf1..d5a32c66a 100644 --- a/lib/librte_eal/include/rte_common.h