DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@6wind.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] Problem with popcnt in librte_acl and ixgbe vector code
Date: Thu, 17 Jul 2014 14:10:32 +0200	[thread overview]
Message-ID: <CALwxeUtzgm_tJ_A8wy9Kd1zanXiTXks63zmcyWdskwLGtEjWqA@mail.gmail.com> (raw)

I noticed a build issue trying to build 1.7.0 on a (old) laptop of mine.

Problem is the same with either 'default' or 'native' machine.

[grrr@glop dpdk]$ make install T=x86_64-native-linuxapp-gcc V=99

[...]

== Build lib/librte_pmd_ixgbe
gcc -Wp,-MD,./.ixgbe_rxtx_vec.o.d.tmp -m64 -pthread  -march=native
-DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2
-DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3
-DRTE_MACHINE_CPUFLAG_SSE4_1
-DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1
 -I/home/grrr/git/dpdk/x86_64-native-linuxapp-gcc/include -include
/home/grrr/git/dpdk/x86_64-native-linuxapp-gcc/include/rte_config.h -O3 -W
-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align
-Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef
-Wwrite-strings -Wno-deprecated   -o ixgbe_rxtx_vec.o -c
/home/grrr/git/dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
In file included from
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include/smmintrin.h:811:0,
                 from
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include/nmmintrin.h:31,
                 from
/home/grrr/git/dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:41:
/home/grrr/git/dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c: In function
‘ixgbe_recv_pkts_vec’:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include/popcntintrin.h:42:1:
error: inlining failed in call to always_inline ‘_mm_popcnt_u64’: target
specific option mismatch
 _mm_popcnt_u64 (unsigned long long __X)
 ^
/home/grrr/git/dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:341:9: error:
called from here
   var = _mm_popcnt_u64(_mm_cvtsi128_si64(staterr));
         ^
/home/grrr/git/dpdk/mk/internal/rte.compile-pre.mk:126: recipe for target
'ixgbe_rxtx_vec.o' failed
make[5]: *** [ixgbe_rxtx_vec.o] Error 1
/home/grrr/git/dpdk/mk/rte.subdir.mk:61: recipe for target
'librte_pmd_ixgbe' failed
make[4]: *** [librte_pmd_ixgbe] Error 2


Here is my cpuinfo :

[grrr@glop ~]$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Genuine Intel(R) CPU           U7300  @ 1.30GHz
stepping : 10
microcode : 0xa07
cpu MHz : 1300.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
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 lm
constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64
monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm
tpr_shadow vnmi flexpriority
bogomips : 2679.57
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

[...]


Idem with librte_acl which complains about _mm_popcnt_u32.

I did not look too much into this, but I would say that we should look at
cpu flags __POPCNT__ to use this popcnt and fallback to a simple
implementation otherwise.

A macro in a common header from eal would be useful here.


-- 
David Marchand

                 reply	other threads:[~2014-07-17 12:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CALwxeUtzgm_tJ_A8wy9Kd1zanXiTXks63zmcyWdskwLGtEjWqA@mail.gmail.com \
    --to=david.marchand@6wind.com \
    --cc=dev@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).