Skip to contentSkip to conversation

common/rte_memcpy: Fix x86intrin.h missed

PATCH In review Michael Qiu 5 participants 9 messages Mar 13, 2015 – Mar 18, 2015 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/rte_memcpy: Fix x86intrin.h missed

rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"

For icc and old gcc, this header is not included.

---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +20 -0
index ac72069..bd10d36 100644
@@ -43,7 +43,27 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+#if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+
+#ifdef __SSE2__
+#include <emmintrin.h>
+#endif
+
+#if defined(__SSE4_2__) || defined(__SSE4_1__)
+#include <smmintrin.h>
+#endif
+
+#if defined(__AVX__)
+#include <immintrin.h>
+#endif
+
+#else
 #include <x86intrin.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
1.9.3
Acked-by
#2 lore raw
In reply to a message not in the archive
Quoted 52 lines

-----Original Message-----
From: Qiu, Michael
Sent: Friday, March 13, 2015 3:03 PM
To: [email protected]
Cc: Wang, Zhihong; Qiu, Michael
Subject: [PATCH] common/rte_memcpy: Fix x86intrin.h missed

rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"

For icc and old gcc, this header is not included.

---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 20
++++++++++++++++++++
 1 file changed, 20 insertions(+)
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +19 -1
index ac72069..bd10d36 100644
@@ -43,7 +43,27 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+#if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+
+#ifdef __SSE2__
+#include <emmintrin.h>
+#endif
+
+#if defined(__SSE4_2__) || defined(__SSE4_1__) #include <smmintrin.h>
+#endif
+
+#if defined(__AVX__)
+#include <immintrin.h>
+#endif
+
+#else
 #include <x86intrin.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
--
Quoted 1 line

1.9.3

#3 lore raw
In reply to a message not in the archive

Hi Michael,

Quoted 48 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Michael Qiu
Sent: Friday, March 13, 2015 7:03 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH] common/rte_memcpy: Fix x86intrin.h missed

rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"

For icc and old gcc, this header is not included.

---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +20 -1
index ac72069..bd10d36 100644
@@ -43,7 +43,27 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+#if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+
+#ifdef __SSE2__
+#include <emmintrin.h>
+#endif
+
+#if defined(__SSE4_2__) || defined(__SSE4_1__)
+#include <smmintrin.h>
+#endif
+
+#if defined(__AVX__)
+#include <immintrin.h>
+#endif
+
+#else
 #include <x86intrin.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
--
Quoted 1 line

1.9.3

Wonder why to spread this thing over?
Why not just #include <rte_common_vec.h>?

Konstantin

#11 lore raw
Quoted 6 lines · John
Quoted 6 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Michael Qiu
Sent: Friday, March 13, 2015 7:03 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH] common/rte_memcpy: Fix x86intrin.h missed

Quoted 6 lines
Quoted 2 lines

rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"

Hi Michael,

How are you generating that error?

For ICC compile, it will report this error, also in suse11sp2 i686 platform, also have this issue as internal report.

Thanks,
Michael

Quoted 2 lines

John

#5 lore raw
In reply to a message not in the archive

2015-03-13 09:44, Ananyev, Konstantin:

Quoted 41 lines

From: dev [mailto:[email protected]] On Behalf Of Michael Qiu

Quoted 40 lines

rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"

For icc and old gcc, this header is not included.

---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +20 -0
index ac72069..bd10d36 100644
@@ -43,7 +43,27 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+#if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+
+#ifdef __SSE2__
+#include <emmintrin.h>
+#endif
+
+#if defined(__SSE4_2__) || defined(__SSE4_1__)
+#include <smmintrin.h>
+#endif
+
+#if defined(__AVX__)
+#include <immintrin.h>
+#endif
+
+#else
 #include <x86intrin.h>
+#endif
 
Quoted 7 lines
Quoted 4 lines
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +0 -1
 #ifdef __cplusplus
 extern "C" {
--

1.9.3

Wonder why to spread this thing over?
Why not just #include <rte_common_vec.h>?

I agree to use rte_common_vec.h.
I pushed this approach to check every tested compilers:

	http://dpdk.org/browse/dpdk/commit/?id=9a01c31b94e54384

I think that rte_common_vec.h should be moved into lib/librte_eal/common/include/arch/x86/rte_vec.h as it's x86-specific.

#6 lore raw

Hi Thomas,

Quoted 57 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, March 16, 2015 4:05 PM
To: Ananyev, Konstantin
Cc: [email protected]; Qiu, Michael
Subject: Re: [dpdk-dev] [PATCH] common/rte_memcpy: Fix x86intrin.h missed

2015-03-13 09:44, Ananyev, Konstantin:

Quoted 41 lines

From: dev [mailto:[email protected]] On Behalf Of Michael Qiu

Quoted 40 lines

rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"

For icc and old gcc, this header is not included.

---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +20 -0
index ac72069..bd10d36 100644
@@ -43,7 +43,27 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+#if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+
+#ifdef __SSE2__
+#include <emmintrin.h>
+#endif
+
+#if defined(__SSE4_2__) || defined(__SSE4_1__)
+#include <smmintrin.h>
+#endif
+
+#if defined(__AVX__)
+#include <immintrin.h>
+#endif
+
+#else
 #include <x86intrin.h>
+#endif
 
Quoted 7 lines
Quoted 4 lines
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +0 -1
 #ifdef __cplusplus
 extern "C" {
--

1.9.3

Wonder why to spread this thing over?
Why not just #include <rte_common_vec.h>?

Quoted 6 lines

I agree to use rte_common_vec.h.
I pushed this approach to check every tested compilers:

	http://dpdk.org/browse/dpdk/commit/?id=9a01c31b94e54384

I think that rte_common_vec.h should be moved into lib/librte_eal/common/include/arch/x86/rte_vec.h as it's x86-specific.

Seems like a good thing to do.
Do you want me to submit a patch for 2.0 for that?

Konstantin

#8 lore raw
In reply to a message not in the archive

2015-03-16 17:39, Ananyev, Konstantin:

Quoted 6 lines

From: Thomas Monjalon [mailto:[email protected]]

Quoted 2 lines

I think that rte_common_vec.h should be moved into lib/librte_eal/common/include/arch/x86/rte_vec.h as it's x86-specific.

Seems like a good thing to do.
Do you want me to submit a patch for 2.0 for that?

It would be nice yes.
Thanks

#9 lore raw
In reply to Ananyev, Konstantin
Quoted 47 lines · Konstantin

Hi Michael,

Quoted 45 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Michael Qiu
Sent: Friday, March 13, 2015 7:03 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH] common/rte_memcpy: Fix x86intrin.h missed

rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"

For icc and old gcc, this header is not included.

---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +20 -0
index ac72069..bd10d36 100644
@@ -43,7 +43,27 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+#if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+
+#ifdef __SSE2__
+#include <emmintrin.h>
+#endif
+
+#if defined(__SSE4_2__) || defined(__SSE4_1__)
+#include <smmintrin.h>
+#endif
+
+#if defined(__AVX__)
+#include <immintrin.h>
+#endif
+
+#else
 #include <x86intrin.h>
+#endif
 
Quoted 6 lines
Quoted 4 lines
lib/librte_eal/common/include/arch/x86/rte_memcpy.h +0 -1
 #ifdef __cplusplus
 extern "C" {
--

1.9.3

Wonder why to spread this thing over?
Why not just #include <rte_common_vec.h>?

Yes, I will send other patch to fix this,

Thanks,
Michael

Quoted 5 lines

Konstantin