在 2021-12-08 22:47:19,"Ilya Maximets" <i.maxim...@ovn.org> 写道: >On 12/8/21 14:30, taoyunupt wrote: >> At 2021-12-07 21:32:32, "Ilya Maximets" <i.maxim...@ovn.org> wrote: >>>On 12/7/21 13:52, taoyunupt wrote: >>>> Thanks Ilya, you are right, it works. I missed libmnl-devel. >>>> >>>> I get another error today, "undefined reference to `rte_eth_from_rings' >>>> " >>>> In my code , rte_eth_from_rings was called in netdev-dpdk.c, and I >>>> have include <rte_eth_ring.h>, and when I compile dpdk with make , not >>>> meson ,it works well. >>>> It is weird. >>> >>>Weird indeed. >>> >>>To be clear, linking with meson-built DPDK is not tested enough >>>in OVS 2.13/2.14 and is not a recommended way to link with DPDK, >>>so there might be some problems. I'd guess that meson disables >>>some libs/drivers during the build due to missing dependencies >>>or something like that, so they are not available while liking >>>with OVS. You may check the meson configuration logs. >>>But ring driver doesn't seem to have any extra dependencies, >>>unless you're trying to build on Windows, so I'm not sure. >>>Or maybe the readers are picked up from the incorrect location. >>> >> >> I solve this problem by delete rte_eth_from_rings .... >> >> The reason Why I want to meson dpdk is that , I want to test mem leak for my >> ovs and dpdk code(19.11) by AddressSanitizer. >> ASAN code could only be used by meson-build(by change some code from >> community). >> >> As for OVS 2.13, I found AddressSanitizer works , such as >> heap-use-after-free,but can not detect memleak, this is my conigure command >> ./configure --with-dpdk=shared --prefix= --localstatedir=/var >> --datarootdir=/usr/share CFLAGS='-g -O2 -fsanitize=address >> -fno-omit-frame-pointer -fno-common -march=native' LIBS='-lfdt' > >Asan may or may not be configured to detect leaks by default. >E.g. unit tests in OVS explicitly disables leak detection due >to possible false-positives. You may try exporting something >like this: > export ASAN_OPTIONS='detect_leaks=1:abort_on_error=true:log_path=asan' >That's the env variable I'm typically using while running tests >locally. > I have added it . Not work. >Note: '-O2' usually triggers some false-positive leak alerts in >our unit tests. '-O1' should work fine. Not work. I have mesond dpdk with ASAN, mem leak also can not be detected, other mem error is OK. I used gcc 8.3 by scl. I think it should be some flag missed, because memleak works with ovs several days ago. >> >> The error as follows: >> Dec 8 19:26:06 bc76 ovs-ctl: Starting ovs-vswitchd INFO: AddressSanitizer >> ignores mlock/mlockall/munlock/munlockall > >This doesn't look like an error, so should not be a problem. >In any case, starting OVS with --no-mlockall (for ovs-ctl) or >simply not passing --mlockall if you're invoking ovs-vswitchd >in the other way should eliminate this message. > >> >> Do you have some advice? >> >> Thanks, >> YUN >> >> >>>> >>>> Hope to get your advice. >>>> Thanks, >>>> YUN >>>> >>>> >>>> >>>> >>>> At 2021-12-06 22:18:01, "Ilya Maximets" <i.maxim...@ovn.org> wrote: >>>>>On 12/6/21 14:09, taoyunupt wrote: >>>>>> Hi ben and Ilya, >>>>>> I meet some compile error, hope to get your advice. >>>>>> My OS is centos7.6,kernel version is 3.10.0-957.el7.x86_64, in X86 >>>>>> arch. I compiled dpdk19.11 by meson , and it seems work, the compiled >>>>>> lib stays in /usr/local/lin64. >>>>>> >>>>>> When I compile DPDK lib with OVS by make , it failed with log >>>>>> "unable to find libmnl, install the dependency package",but actually I >>>>>> have installed libmnl-1.0.3-7.el7.x86_64 >>>>> >>>>>Do you have libmnl-devel installed? >>>>> >>>>>> >>>>>> Thanks for yor advices. >>>>>> YUN >>>>>> >>>>>> The dpdk compile script is: >>>>>> export DPDK_DIR=$(pwd) >>>>>> cd $DPDK_DIR >>>>>> #configure and install DPDK using Meson >>>>>> >>>>>> #build and install the DPDK library: >>>>>> >>>>>> export DPDK_BUILD=$DPDK_DIR/build >>>>>> meson build >>>>>> ninja -C build >>>>>> ninja -C build install >>>>>> ldconfig >>>>>> >>>>>> >>>>>> The ovs compile script is : >>>>>> export DPDK_DIR=/usr/local >>>>>> export DPDK_TARGET=lib64 >>>>>> export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET >>>>>> >>>>>> export OVS_DIR=/root/rpmbuild/SOURCES/openvswitch >>>>>> >>>>>> cd $OVS_DIR >>>>>> ./boot.sh >>>>>> >>>>>> ./configure --with-dpdk=$DPDK_BUILD --prefix= --localstatedir=/var >>>>>> --datarootdir=/usr/share CFLAGS='-O0 -g' LIBS='-lfdt' >>>>>> >>>>>> make -j 32 >>>>>> make install >>>>>> >>>> >>
_______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss