From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by dpdk.org (Postfix) with ESMTP id EA8F1590F for ; Thu, 17 Jul 2014 14:09:37 +0200 (CEST) Received: by mail-oi0-f42.google.com with SMTP id a3so940234oib.29 for ; Thu, 17 Jul 2014 05:10:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=nOhM7VlAz7HCE2s+P+FIIR/IoQftQekdTe84UfeBs2Q=; b=KpRh5k8S0PMuNbrUYuT41Yh60xr8TWDnuAJoty+EjzmFtgZE44BNzpyKpDyVI/pjEA ECjRMzbrFt5fOmvEUg/vUfDYsUlUStwGT8nkGWXr+hNbfsR203+L7k9sQdHVjX4zr6NJ C177BA1BHz9h2e2cAAvcug+EmooMo5YVZf038JBDXfdDxo0qrus3lNQy8OT22V0NlIwN cBl0nIuig+Xi69rnz116VjCchMrjFz75Fkl3j0UXzMnwmChZD53S6HNnV2FwLM5FxFXw Czb8fH3l0eafYKSQNAadVHjJ9b74bbGgN7HSRvBhdf4S9HUS1tZz+haYVpwCd+yy5Rp8 kUgA== X-Gm-Message-State: ALoCoQksnLYNhFsfQaE4lIvINy1L8sl2CY+A1FneujJH9j8nF9ZPzr7xfiWF39v9C4MxpkWvlZv3 MIME-Version: 1.0 X-Received: by 10.182.106.137 with SMTP id gu9mr38067688obb.7.1405599032936; Thu, 17 Jul 2014 05:10:32 -0700 (PDT) Received: by 10.202.214.88 with HTTP; Thu, 17 Jul 2014 05:10:32 -0700 (PDT) Date: Thu, 17 Jul 2014 14:10:32 +0200 Message-ID: From: David Marchand To: "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Problem with popcnt in librte_acl and ixgbe vector code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2014 12:09:38 -0000 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=3Dx86_64-native-linuxapp-gcc V=3D99 [...] =3D=3D Build lib/librte_pmd_ixgbe gcc -Wp,-MD,./.ixgbe_rxtx_vec.o.d.tmp -m64 -pthread -march=3Dnative -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=3DRTE_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 =E2=80=98ixgbe_recv_pkts_vec=E2=80=99: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include/popcntintrin.h:42:1: error: inlining failed in call to always_inline =E2=80=98_mm_popcnt_u64=E2= =80=99: 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 =3D _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. --=20 David Marchand