> -----Original Message----- > From: Jerin Jacob <jerinjac...@gmail.com> > Sent: Friday, October 30, 2020 9:22 AM > To: McDaniel, Timothy <timothy.mcdan...@intel.com> > Cc: dpdk-dev <dev@dpdk.org>; Carrillo, Erik G <erik.g.carri...@intel.com>; > Eads, > Gage <gage.e...@intel.com>; Van Haaren, Harry > <harry.van.haa...@intel.com>; Jerin Jacob <jer...@marvell.com>; Thomas > Monjalon <tho...@monjalon.net> > Subject: Re: [dpdk-dev] [PATCH v5 00/23] Add DLB2 PMD > > On Fri, Oct 30, 2020 at 3:19 PM Timothy McDaniel > <timothy.mcdan...@intel.com> wrote: > > > > > Timothy McDaniel (23): > > event/dlb2: add documentation and meson build infrastructure > > event/dlb2: add dynamic logging > > event/dlb2: add private data structures and constants > > event/dlb2: add definitions shared with LKM or shared code > > event/dlb2: add inline functions > > event/dlb2: add eventdev probe > > There is build error with clang and static build here. > Please send the next version with fix. > > meson -Dexamples=l3fwd --buildtype=debugoptimized --werror > --default-library=static /export/dpdk-next-eventdev/devtools/.. > ./build-clang-static > The Meson build system > Version: 0.55.3 > Source dir: /export/dpdk-next-eventdev > Build dir: /export/dpdk-next-eventdev/build-clang-static > Build type: native build > Program cat found: YES > Using 'PKG_CONFIG_PATH' from environment with value: '' > Using 'PKG_CONFIG_PATH' from environment with value: '' > Project name: DPDK > Project version: 20.11.0-rc1 > Using 'CC' from environment with value: 'ccache clang' > Using 'CFLAGS' from environment with value: '' > Using 'LDFLAGS' from environment with value: '' > Using 'CPPFLAGS' from environment with value: '' > Using 'CC' from environment with value: 'ccache clang' > Using 'CFLAGS' from environment with value: '' > Using 'LDFLAGS' from environment with value: '' > Using 'CPPFLAGS' from environment with value: '' > C compiler for the host machine: ccache clang (clang 10.0.1 "clang > version 10.0.1 ") > C linker for the host machine: clang ld.bfd 2.35.1 > Host machine cpu family: x86_64 > Host machine cpu: x86_64 > Program pkg-config found: YES > Program gen-pmdinfo-cfile.sh found: YES > Program list-dir-globs.py found: YES > Program check-symbols.sh found: YES > Program options-ibverbs-static.sh found: YES > Program binutils-avx512-check.sh found: YES > Program python3 found: YES (/usr/bin/python) > > > > ccache clang -Idrivers/libtmp_rte_event_dlb2.a.p -Idrivers > -I../drivers -Idrivers/event/dlb2 -I../drivers/event/dlb2 > -Ilib/librte_eventdev -I../lib/librte_eventdev -I. -I.. -Iconfig > -I../config -Ilib/librte_eal/include -I../lib/librte_eal/i > nclude -Ilib/librte_eal/linux/include > -I../lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > -I../lib/librte_eal/x86/include -Ilib/librte_eal/common > -I../lib/librte_eal/common -Ilib/librte_eal -I../lib/librte_eal > -Ilib/librte_kvargs > -I../lib/librte_kvargs -Ilib/librte_metrics -I../lib/librte_metrics > -Ilib/librte_telemetry -I../lib/librte_telemetry -Ilib/librte_ring > -I../lib/librte_ring -Ilib/librte_ethdev -I../lib/librte_ethdev > -Ilib/librte_net -I../lib/librte_net -Il > ib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool > -I../lib/librte_mempool -Ilib/librte_meter -I../lib/librte_meter > -Ilib/librte_hash -I../lib/librte_hash -Ilib/librte_rcu > -I../lib/librte_rcu -Ilib/librte_timer -I../lib/librte_timer - > Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_pci > -I../lib/librte_pci -Idrivers/bus/pci -I../drivers/bus/pci > -I../drivers/bus/pci/linux -Xclang -fcolor-diagnostics -pipe > -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O2 > -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > -Wformat-nonliteral -Wformat-security -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef - > Wwrite-strings -Wno-address-of-packed-member > -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native > -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -MD -MQ > drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_dlb2_main.c.o -MF > drivers/l > ibtmp_rte_event_dlb2.a.p/event_dlb2_pf_dlb2_main.c.o.d -o > drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_dlb2_main.c.o -c > ../drivers/event/dlb2/pf/dlb2_main.c > In file included from ../drivers/event/dlb2/pf/dlb2_main.c:22: > ../drivers/event/dlb2/pf/../dlb2_inline_fns.h:41:2: error: use of > unknown builtin '__builtin_ia32_movntdq' > [-Wimplicit-function-declaration] > __builtin_ia32_movntdq((__v2di *)pp_addr, (__v2di)src_data0); > ^ > ../drivers/event/dlb2/pf/../dlb2_inline_fns.h:41:2: note: did you mean > '__builtin_ia32_movntq'? > /usr/lib/clang/10.0.1/include/xmmintrin.h:2122:3: note: > '__builtin_ia32_movntq' declared here > __builtin_ia32_movntq(__p, __a); > > [2010/2491] Compiling C object > drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_dlb2_pf.c.o > FAILED: drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_dlb2_pf.c.o > ccache clang -Idrivers/libtmp_rte_event_dlb2.a.p -Idrivers > -I../drivers -Idrivers/event/dlb2 -I../drivers/event/dlb2 > -Ilib/librte_eventdev -I../lib/librte_eventdev -I. -I.. -Iconfig > -I../config -Ilib/librte_eal/include -I../lib/librte_eal/i > nclude -Ilib/librte_eal/linux/include > -I../lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > -I../lib/librte_eal/x86/include -Ilib/librte_eal/common > -I../lib/librte_eal/common -Ilib/librte_eal -I../lib/librte_eal > -Ilib/librte_kvargs > -I../lib/librte_kvargs -Ilib/librte_metrics -I../lib/librte_metrics > -Ilib/librte_telemetry -I../lib/librte_telemetry -Ilib/librte_ring > -I../lib/librte_ring -Ilib/librte_ethdev -I../lib/librte_ethdev > -Ilib/librte_net -I../lib/librte_net -Il > ib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool > -I../lib/librte_mempool -Ilib/librte_meter -I../lib/librte_meter > -Ilib/librte_hash -I../lib/librte_hash -Ilib/librte_rcu > -I../lib/librte_rcu -Ilib/librte_timer -I../lib/librte_timer - > Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_pci > -I../lib/librte_pci -Idrivers/bus/pci -I../drivers/bus/pci > -I../drivers/bus/pci/linux -Xclang -fcolor-diagnostics -pipe > -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O2 > -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > -Wformat-nonliteral -Wformat-security -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef - > Wwrite-strings -Wno-address-of-packed-member > -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native > -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -MD -MQ > drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_dlb2_pf.c.o -MF > drivers/lib > tmp_rte_event_dlb2.a.p/event_dlb2_pf_dlb2_pf.c.o.d -o > drivers/libtmp_rte_event_dlb2.a.p/event_dlb2_pf_dlb2_pf.c.o -c > ../drivers/event/dlb2/pf/dlb2_pf.c > In file included from ../drivers/event/dlb2/pf/dlb2_pf.c:35: > ../drivers/event/dlb2/pf/../dlb2_inline_fns.h:41:2: error: use of > unknown builtin '__builtin_ia32_movntdq' > [-Wimplicit-function-declaration] > __builtin_ia32_movntdq((__v2di *)pp_addr, (__v2di)src_data0);
Not sure why this builds for me, but I do not see this error. According to information online, '__builtin_ia32_movntdq' should be available if -msse2 is set. According to the following snippet from config/x86/meson.build, it looks like msse4 is defined. <snippet> # we require SSE4.2 for DPDK if cc.get_define('__SSE4_2__', args: machine_args) == '' message('SSE 4.2 not enabled by default, explicitly enabling') machine_args += '-msse4' endif <end snippet> I realize this is from clang, not gcc, but why are they out of sync? such that __builtin_ia32_movntdq is not available in clang, but is available in gcc. Should I convert to _mm_stream_si128 (__m128i *__A, __m128i __B) ? Any guidance on how to get past this would be greatly appreciated. Thanks, Tim