Please submit patch…. 

Thanks

—
Damjan

> On 30 Apr 2020, at 10:06, Lijian Zhang <lijian.zh...@arm.com> wrote:
> 
> Hi Damjan,
> I used clang-6 to compile vpp with command ‘make build-release CC=clang V=1’, 
> but clang reports warnings/errors caused by the unused option '-L' in 
> compiling stage, as it's not linking stage, and does not require linking 
> libraries.
>
> In dpdk.mk, the linking librariy path should be attached to 
> DPDK_EXTRA_LDFLAGS, instead of DPDK_EXTRA_CFLAGS.
>
> Not sure if clang-9 will report this warning/error or not.
>
> diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk
> -DPDK_EXTRA_CFLAGS += -L$(I)/lib -I$(I)/include
> +DPDK_EXTRA_CFLAGS += -I$(I)/include
> +DPDK_EXTRA_LDFLAGS += -L$(I)/lib
>
> clang -Wp,-MD,./.ark_ddm.o.d.tmp  -fPIE -fPIC -pthread 
> -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/lib/librte_eal/linux/eal/include
>   -march=armv8-a+crc -DRTE_MACHINE_CPUFLAG_NEON -DRTE_MACHINE_CPUFLAG_CRC32  
> -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include
>  -DRTE_USE_FUNCTION_VERSIONING -include 
> /root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include/rte_config.h
>  -D_GNU_SOURCE -O3 -I./ -W -Wall -Wstrict-prototypes -Wmissing-prototypes 
> -Wmissing-declarations -Wold-style-definition -Wpointer-arith 
> -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef 
> -Wwrite-strings -Wdeprecated -Wno-missing-field-initializers 
> -Wno-address-of-packed-member -Werror   -g -mtune=generic 
> -L/root/origin/build-root/install-vpp-native/external/lib 
> -I/root/origin/build-root/install-vpp-native/external/include -o ark_ddm.o -c 
> /root/origin/build-root/build-vpp-native/external/dpdk-20.02/drivers/net/ark/ark_ddm.c
> == Build drivers/vdpa/ifc
> clang: warning: argument unused during compilation: 
> '-L/root/origin/build-root/install-vpp-native/external/lib' 
> [-Wunused-command-line-argument]
> clang: error: argument unused during compilation: 
> '-L/root/origin/build-root/install-vpp-native/external/lib' 
> [-Werror,-Wunused-command-line-argument]
>
> Thanks.
> From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io 
> <mailto:vpp-dev@lists.fd.io>> On Behalf Of Damjan Marion via lists.fd.io 
> <http://lists.fd.io/>
> Sent: 2020年4月29日 4:33
> To: Dave Barach <d...@barachs.net <mailto:d...@barachs.net>>
> Cc: Florin Coras <fcoras.li...@gmail.com <mailto:fcoras.li...@gmail.com>>; 
> vpp-dev <vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>>
> Subject: Re: [vpp-dev] clang-9
>
> 
> Yes, (u8 *) in front of 1st argument will likely help….
> 
> — 
> Damjan
> 
> > On 28 Apr 2020, at 22:07, d...@barachs.net <mailto:d...@barachs.net> wrote:
> > 
> > Kind of. Memset has no stated alignment requirements. Is there a form of it 
> > which will let us say "please no aligned vector ops..."
> > 
> > Dave
> > 
> > -----Original Message-----
> > From: Damjan Marion <dmar...@me.com <mailto:dmar...@me.com>> 
> > Sent: Tuesday, April 28, 2020 3:50 PM
> > To: Florin Coras <fcoras.li...@gmail.com <mailto:fcoras.li...@gmail.com>>
> > Cc: vpp-dev <vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>>; Dave Barach 
> > (dbarach) <dbar...@cisco.com <mailto:dbar...@cisco.com>>
> > Subject: Re: [vpp-dev] clang-9
> > 
> > 
> > Looks like you told compiler that svm_fifo_t will be always cacheline 
> > aligned:
> > 
> >  typedef struct _svm_fifo
> >  {
> >    CLIB_CACHE_LINE_ALIGN_MARK (shared_first);
> > 
> > 
> > but you increment pointer for something that it is not X*64:
> > 
> > fmem += hdrs + rounded_data_size;
> > 
> > So clang caught you cheating :)
> > 
> > —
> > Damjan
> > 
> > 
> > 
> >> On 28 Apr 2020, at 21:25, Florin Coras <fcoras.li...@gmail.com 
> >> <mailto:fcoras.li...@gmail.com>> wrote:
> >> 
> >> Hi Damjan,
> >> 
> >> Just tried the vcl tests and the debug version works just fine. The 
> >> release images crash (at least in the test I’m looking at) doing:
> >> 
> >> memset (f, 0, sizeof (*f))
> >> 
> >> From gdb: 
> >> 
> >> (gdb) x/i $pc
> >> => 0x7f15fcd329f4 <fs_try_alloc_fifo_batch+388>:        movaps 
> >> %xmm0,0x1f0(%rdi,%rbp,1)
> >> (gdb) i r rdi
> >> rdi            0x204024780      8657192832
> >> (gdb) i r rbp
> >> rbp            0x100018 0x100018
> >> (gdb) p f
> >> $7 = (svm_fifo_t *) 0x204024780 <- the thing being memset
> >> 
> >> If my math is correct, the right hand operator is 0x1f0 + 0x204024780 + 
> >> 0x100018 = 0x204124988. Doesn’t look to be aligned. Could this be the 
> >> issue? 
> >> 
> >> Florin
> >> 
> >>> On Apr 28, 2020, at 7:13 AM, Damjan Marion via lists.fd.io 
> >>> <http://lists.fd.io/> <dmarion=me....@lists.fd.io 
> >>> <mailto:dmarion=me....@lists.fd.io>> wrote:
> >>> 
> >>> 
> >>> Folks,
> >>> 
> >>> As there is bug in gnu assembler which is shipping with ubuntu 18.04 we 
> >>> are not able to produce working binaries with avx512 instruction set.
> >>> Because of that, I had to change default to avx2. reported bug[1], but it 
> >>> is ignored for a year.
> >>> 
> >>> As alternative[2], I wanted to consider using clang-9 which is shipped 
> >>> with ubuntu 18.04 and seems like it is even capable of producing faster 
> >>> binaries than gcc.
> >>> Unfortunately, "make test" is failing at several places including vxlan, 
> >>> ipsec and tcp stack[3].
> >>> 
> >>> May I ask folks who “own” that code to take a quick look?
> >>> 
> >>> Thanks,
> >>> 
> >>> Damjan
> >>> 
> >>> [1] 
> >>> https://bugs.launchpad.net/ubuntu/cosmic/+source/binutils/+bug/181996 
> >>> <https://bugs.launchpad.net/ubuntu/cosmic/+source/binutils/+bug/181996>
> >>> 1 [2] https://gerrit.fd.io/r/c/vpp/+/26744 
> >>> <https://gerrit.fd.io/r/c/vpp/+/26744>
> >>> [3] 
> >>> https://jenkins.fd.io/job/vpp-verify-master-ubuntu1804/3615/console 
> >>> <https://jenkins.fd.io/job/vpp-verify-master-ubuntu1804/3615/console>
> >>> 
> >>> 
> >>> 
> >>> 
> >> 
> >> 
> > 
> > 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16214): https://lists.fd.io/g/vpp-dev/message/16214
Mute This Topic: https://lists.fd.io/mt/73327785/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to