[dpdk-dev] [PATCH] common/rte_memcpy: Fix x86intrin.h missed

Ananyev, Konstantin konstantin.ananyev at intel.com
Mon Mar 16 18:39:31 CET 2015


Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Monday, March 16, 2015 4:05 PM
> To: Ananyev, Konstantin
> Cc: dev at dpdk.org; Qiu, Michael
> Subject: Re: [dpdk-dev] [PATCH] common/rte_memcpy: Fix x86intrin.h missed
> 
> 2015-03-13 09:44, Ananyev, Konstantin:
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Michael Qiu
> > >
> > > rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"
> > >
> > > For icc and old gcc, this header is not included.
> > >
> > > Signed-off-by: Michael Qiu <michael.qiu at intel.com>
> > > ---
> > >  lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 20 ++++++++++++++++++++
> > >  1 file changed, 20 insertions(+)
> > >
> > > 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 ac72069..bd10d36 100644
> > > --- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
> > > +++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
> > > @@ -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" {
> > > --
> > > 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.

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

Konstantin




More information about the dev mailing list