DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1
@ 2016-01-28  7:30 Michael Qiu
  2016-01-28  8:01 ` Wang, Zhihong
  2016-01-28  8:30 ` Thomas Monjalon
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Qiu @ 2016-01-28  7:30 UTC (permalink / raw)
  To: dev

In fedora 22 with GCC version 5.3.1, when compile,
will result an error:

    include/rte_memcpy.h:309:7: error: "RTE_MACHINE_CPUFLAG_AVX2"
                                is not defined [-Werror=undef]
    #elif RTE_MACHINE_CPUFLAG_AVX2

Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms")

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
---
 app/test/test_memcpy_perf.c                         | 2 +-
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
index 73babec..f150d8d 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -81,7 +81,7 @@ static size_t buf_sizes[TEST_VALUE_RANGE];
 /* Data is aligned on this many bytes (power of 2) */
 #ifdef RTE_MACHINE_CPUFLAG_AVX512F
 #define ALIGNMENT_UNIT          64
-#elif RTE_MACHINE_CPUFLAG_AVX2
+#elif defined RTE_MACHINE_CPUFLAG_AVX2
 #define ALIGNMENT_UNIT          32
 #else /* RTE_MACHINE_CPUFLAG */
 #define ALIGNMENT_UNIT          16
diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index d965957..8e2c53c 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -306,7 +306,7 @@ COPY_BLOCK_128_BACK63:
 	goto COPY_BLOCK_128_BACK63;
 }
 
-#elif RTE_MACHINE_CPUFLAG_AVX2
+#elif defined RTE_MACHINE_CPUFLAG_AVX2
 
 /**
  * AVX2 implementation below
-- 
1.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1
  2016-01-28  7:30 [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1 Michael Qiu
@ 2016-01-28  8:01 ` Wang, Zhihong
  2016-01-28  8:34   ` Thomas Monjalon
  2016-01-28  8:30 ` Thomas Monjalon
  1 sibling, 1 reply; 5+ messages in thread
From: Wang, Zhihong @ 2016-01-28  8:01 UTC (permalink / raw)
  To: Qiu, Michael; +Cc: dev

> Subject: [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1
> 
> In fedora 22 with GCC version 5.3.1, when compile,
> will result an error:
> 
>     include/rte_memcpy.h:309:7: error: "RTE_MACHINE_CPUFLAG_AVX2"
>                                 is not defined [-Werror=undef]
>     #elif RTE_MACHINE_CPUFLAG_AVX2
> 
> Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms")
> 
> Signed-off-by: Michael Qiu <michael.qiu@intel.com>
> ---
>  app/test/test_memcpy_perf.c                         | 2 +-
>  lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)


There's issue in the original code.

#elif works with statements:
#elif < statement: true or false>

But what it meant is whether the identifier has been defined:
#elif defined <identifier>

Thanks for correcting this!

Acked-by: Wang, Zhihong <zhihong.wang@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1
  2016-01-28  7:30 [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1 Michael Qiu
  2016-01-28  8:01 ` Wang, Zhihong
@ 2016-01-28  8:30 ` Thomas Monjalon
  2016-01-28  8:37   ` Qiu, Michael
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2016-01-28  8:30 UTC (permalink / raw)
  To: Michael Qiu; +Cc: dev

2016-01-28 15:30, Michael Qiu:
> In fedora 22 with GCC version 5.3.1, when compile,
> will result an error:
> 
>     include/rte_memcpy.h:309:7: error: "RTE_MACHINE_CPUFLAG_AVX2"
>                                 is not defined [-Werror=undef]
>     #elif RTE_MACHINE_CPUFLAG_AVX2
> 
> Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms")

Thanks for the quick fix.

Note about the title formatting:
As you see in the "Fixes:" line, the title of the original commit
was starting with "eal/x86". Yours should adopt the same convention.
A lot of patches are sent with "lib/librte_eal" which was never used
in the git history. If not sure when writing the title, please check
the history to keep it consistent.
As usual, I will reword it.
Thanks for your attention

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1
  2016-01-28  8:01 ` Wang, Zhihong
@ 2016-01-28  8:34   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2016-01-28  8:34 UTC (permalink / raw)
  To: Qiu, Michael; +Cc: dev

2016-01-28 08:01, Wang, Zhihong:
> > In fedora 22 with GCC version 5.3.1, when compile,
> > will result an error:
> > 
> >     include/rte_memcpy.h:309:7: error: "RTE_MACHINE_CPUFLAG_AVX2"
> >                                 is not defined [-Werror=undef]
> >     #elif RTE_MACHINE_CPUFLAG_AVX2
> > 
> > Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms")
> > 
> > Signed-off-by: Michael Qiu <michael.qiu@intel.com>
> 
> There's issue in the original code.
> 
> #elif works with statements:
> #elif < statement: true or false>
> 
> But what it meant is whether the identifier has been defined:
> #elif defined <identifier>
> 
> Thanks for correcting this!
> 
> Acked-by: Wang, Zhihong <zhihong.wang@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1
  2016-01-28  8:30 ` Thomas Monjalon
@ 2016-01-28  8:37   ` Qiu, Michael
  0 siblings, 0 replies; 5+ messages in thread
From: Qiu, Michael @ 2016-01-28  8:37 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On 1/28/2016 4:32 PM, Thomas Monjalon wrote:
> 2016-01-28 15:30, Michael Qiu:
>> In fedora 22 with GCC version 5.3.1, when compile,
>> will result an error:
>>
>>     include/rte_memcpy.h:309:7: error: "RTE_MACHINE_CPUFLAG_AVX2"
>>                                 is not defined [-Werror=undef]
>>     #elif RTE_MACHINE_CPUFLAG_AVX2
>>
>> Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms")
> Thanks for the quick fix.
>
> Note about the title formatting:
> As you see in the "Fixes:" line, the title of the original commit
> was starting with "eal/x86". Yours should adopt the same convention.
> A lot of patches are sent with "lib/librte_eal" which was never used
> in the git history. If not sure when writing the title, please check
> the history to keep it consistent.

OK, next time I will do it.

Thanks for point it out.

Thanks,
Michael
> As usual, I will reword it.
> Thanks for your attention
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-28  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-28  7:30 [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1 Michael Qiu
2016-01-28  8:01 ` Wang, Zhihong
2016-01-28  8:34   ` Thomas Monjalon
2016-01-28  8:30 ` Thomas Monjalon
2016-01-28  8:37   ` Qiu, Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).