DPDK usage discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Pavey, Nicholas" <npavey@akamai.com>, "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] GCC compile errors from 'rte_memcpy.h' in stand-alone environment
Date: Thu, 16 Jun 2016 15:16:57 +0000	[thread overview]
Message-ID: <F07AB358-356D-466A-996B-1AB98F00260A@intel.com> (raw)
In-Reply-To: <EB4944C7-044D-4CF2-BE44-36E8FED6D118@akamai.com>


On 6/16/16, 10:03 AM, "users on behalf of Pavey, Nicholas" <users-bounces@dpdk.org on behalf of npavey@akamai.com> wrote:

>Hi Folks,
>
>I’m developing a benchmarking environment for some code that I’ll eventually link with the DPDK. However, at the moment it’s not integrated with the DPDK because it makes testing and debug easier.
>
>I’d like to use the ‘rte_memcpy’ function, since it’s a good implementation using non-temporal instructions. The DPDK version is a lot better than something I hack together ;-)
>
>When I compile the code I’m getting a lot of errors along the lines of this:
>
>c_src/rte_memcpy.h:870:2: error: incompatible type for argument 2 of '_mm_storeu_si128'
>In file included from c_src/main.h:23:0,
>                 from c_src/main.c:1:
>/usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:700:1: note: expected '__m128i' but argument is of type 'int'
> _mm_storeu_si128 (__m128i *__P, __m128i __B)
> ^
>In file included from c_src/main.h:33:0,
>                 from c_src/main.c:1:
>c_src/rte_memcpy.h:870:2: error: incompatible type for argument 2 of '_mm_storeu_si128'
>  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
>  ^
>In file included from c_src/main.h:23:0,
>                 from c_src/main.c:1:
>/usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:700:1: note: expected '__m128i' but argument is of type 'int'
> _mm_storeu_si128 (__m128i *__P, __m128i __B)
> ^
>In file included from c_src/main.h:33:0,
>                 from c_src/main.c:1:
>c_src/rte_memcpy.h:870:2: error: incompatible type for argument 2 of '_mm_storeu_si128'
>  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
>  ^
>In file included from c_src/main.h:23:0,
>                 from c_src/main.c:1:
>/usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:700:1: note: expected '__m128i' but argument is of type 'int'
> _mm_storeu_si128 (__m128i *__P, __m128i __B)
>
>(There are an awful lot of these…)
>
>
>The compile command line is:
>
>  gcc -O3 --no-omit-frame-pointer -Wall -m64 -std=c99 -g –I/include/path/to/libhugetlbfs –I/include/path/to/libnuma -Ic_src -Icpp_src -c c_src/main.c -o c_objs/main.o

One suggestion is to build DPDK and link against the DPDK library to get rte_memcpy or link using the rte_memcpy.o file. Also if DPDK compiles without problems, then add a ‘V=1’ to the make line as in ‘make install T=x86_64-native-linuxapp-gcc V=1’ which will show you the compile line for rte_memcpy.c

I hope this helps.
++Keith
>
>The compiler version is:
>
>  gcc -v
>  Using built-in specs.
>  COLLECT_GCC=gcc
>  COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
>  Target: x86_64-linux-gnu
>  Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>  Thread model: posix
>  gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1) 
>
>OS distribution : Ubuntu 14.04
>Kernel version : 3.13.0-85-generic
>
>Processor type : Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
>Processor flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
>
>
>Can anyone suggest what I can do to make ‘rte_memcpy’ compile correctly outside of the complete build environment?
>
>Thanks,
>
>
>Nick
>
>
>




  reply	other threads:[~2016-06-16 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 15:03 Pavey, Nicholas
2016-06-16 15:16 ` Wiles, Keith [this message]
2016-06-16 19:10   ` Pavey, Nicholas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F07AB358-356D-466A-996B-1AB98F00260A@intel.com \
    --to=keith.wiles@intel.com \
    --cc=npavey@akamai.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).