[ovs-dev] [PATCH dpdk-latest v4] build: Add support for DPDK meson build.

Pai G, Sunil sunil.pai.g at intel.com
Wed Dec 16 12:42:56 UTC 2020


Hi Zhang, 
Please see comments inline.


> -----Original Message-----
> From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> Sent: Wednesday, December 16, 2020 7:56 AM
> To: Pai G, Sunil <sunil.pai.g at intel.com>
> Cc: Ilya Maximets <i.maximets at ovn.org>; ovs dev <dev at openvswitch.org>;
> David Marchand <david.marchand at redhat.com>; Stokes, Ian
> <ian.stokes at intel.com>; Richardson, Bruce <bruce.richardson at intel.com>
> Subject: Re: [ovs-dev] [PATCH dpdk-latest v4] build: Add support for DPDK
> meson build.
> 
> On Wed, Dec 16, 2020 at 12:55 AM Pai G, Sunil <sunil.pai.g at intel.com>
> wrote:
> >
> > Hi Zhang,
> >
> > Could you give this patch a try as well ?
> >
> http://patchwork.ozlabs.org/project/openvswitch/patch/20201215164128.1
> > 3153-1-sunil.pai.g at intel.com/ This has a check in place to throw an
> > error if the pkg-config is buggy.
> >
> > Note that this is for the master branch. So, when you switch from dpdk-
> latest to master , you would need to execute ./boot.sh before running the
> configure command.
> Hi Pai
> Building the ovs --with-dpdk=static, works fine for us. so
> Tested-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> 
> By the way, ovs --with-dpdk=shared, still doesn't work.

I tried your build commands using latest dpdk-next-net and OVS-dpdk-latest branch. It worked fine for me on ubuntu18.04.
Moreover, GHA and travis CI's are passing for the shared builds.
So, it might be a problem with the system you are using. 
Best to check the paths you are setting as well.

Btw, which branch in OVS and which OS are you using ?
Could you also try running a sample application in dpdk like l2fwd and check if it works fine as well ?


> 
> > > -----Original Message-----
> > > From: Richardson, Bruce <bruce.richardson at intel.com>
> > > Sent: Tuesday, December 15, 2020 7:09 PM
> > > To: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> > > Cc: Ilya Maximets <i.maximets at ovn.org>; Pai G, Sunil
> > > <sunil.pai.g at intel.com>; ovs dev <dev at openvswitch.org>; David
> > > Marchand <david.marchand at redhat.com>; Stokes, Ian
> > > <ian.stokes at intel.com>
> > > Subject: RE: [ovs-dev] [PATCH dpdk-latest v4] build: Add support for
> > > DPDK meson build.
> > >
> > > <snip>
> > >
> > > > > > Hi Ilya
> > > > > > I tested the patch
> > > > > > https://patchwork.ozlabs.org/project/openvswitch/patch/1607977
> > > > > > 825-
> > > > 30877-1-
> > > > > > git-send-email-ian.stokes at intel.com/
> > > > > > As I said if we update the pkg-conf to new version. and we
> > > > > > config the ovs --with-dpdk=static, ovs works fine.
> > > > > > but if we build ovs --with-dpdk=shared, ovs doesn't work,
> > > > > > there is
> > > > error
> > > > > > log:
> > > > > > 2020-12-14T20:15:07.940Z|00018|dpdk|INFO|EAL ARGS:
> > > > > > ovs-vswitchd -
> > > a
> > > > > >
> > > >
> > >
> 0000:82:00.0,dv_flow_en=1,dv_esw_en=1,l3_vxlan_en=1,dv_xmeta_en=2,r
> > > epr
> > > > esen
> > > > > > tor=[0-6]
> > > > > > -c 0xe --huge-dir /dev/hugepages --socket-mem 1024,1024
> > > > > > --socket-limit 1024,1024.
> > > > > > 2020-12-14T20:15:07.946Z|00019|dpdk|INFO|EAL: Detected 56
> > > > > > lcore(s)
> > > > > > 2020-12-14T20:15:07.946Z|00020|dpdk|INFO|EAL: Detected 2
> NUMA
> > > > > > nodes
> > > > > > 2020-12-14T20:15:07.946Z|00021|dpdk|ERR|EAL: failed to parse
> > > > > > device "0000:82:00.0"
> > > > > > 2020-12-14T20:15:07.946Z|00022|dpdk|ERR|EAL: Unable to parse
> > > > > > device
> > > > > >
> > > >
> > >
> '0000:82:00.0,dv_flow_en=1,dv_esw_en=1,l3_vxlan_en=1,dv_xmeta_en=2,r
> > > ep
> > > > rese
> > > > > > ntor=[0-6]'
> > > > > > 2020-12-14T20:15:07.946Z|00023|dpdk|EMER|Unable to initialize
> > > > > > DPDK: No such device
> > > > > >
> > > > > > because pci bus was not registered.
> > > > > >
> > > > > > In dpdk:
> > > > > > eal_plugins_init
> > > > > > rte_pci_scan
> > > > > > eal_option_device_parse -- no pci bus
> > > > > >
> > > > > >
> > > > >
> > > > > Is DPDK installed systemwide so that the drivers - including pci
> > > > > bus driver - can be picked up automatically on init? If not, you
> > > > > may well need to pass the path to the drivers via the "-d" flag on
> startup.
> > > > Hi
> > > > I build ovs, shown as below:
> > > >
> > > > export DPDK_TARGET=x86_64-native-linuxapp-gcc
> > > > meson -Dprefix=/root/local/dpdk-next-net -Dmax_ethports=256
> > > > -Dbuildtype=debug
> > > > -Ddisable_drivers=event/*,net/tap,net/nfb,net/mlx4,crypto/*
> > > > $DPDK_TARGET
> > > > ninja -C $DPDK_TARGET install
> > > > ldconfig
> > > >
> > > > export
> > > > LD_LIBRARY_PATH=/root/local/dpdk-next-
> net/lib64:$LD_LIBRARY_PATH
> > > > export PKG_CONFIG_PATH=/root/local/dpdk-next-
> > > > net/lib64/pkgconfig/:$PKG_CONFIG_PATH
> > > > ./configure --enable-Werror --prefix=/root/local/openvswitch-2.14
> > > > --disable-ssl --disable-libcapng --with-dpdk=shared 'CFLAGS=-g -O0
> > > > -Wno-deprecated-declarations'
> > > > make && make install
> > > >
> > > > One question if we export  LD_LIBRARY_PATH, we also use "-d" flag ?
> > > >
> > > > > Regards,
> > > > > /Bruce
> > >
> > > In the case above, I think the drivers should all be loaded
> > > automatically from
> > > "/root/local/dpdk-next-net/lib64/dpdk/pmds-21.0/". The
> RTE_EAL_PMD_PATH should point to that location.
> > >
> > > To verify, can you check the "rte_build_config.h" file in your DPDK
> > > build, and confirm that the path given there for RTE_EAL_PMD_PATH
> > > corresponds to the path where the actual driver .so files are installed?
> > >
> > > /Bruce
> >
> >
> > Thanks and regards
> > Sunil
> 
> 
> 
> --
> Best regards, Tonghao


More information about the dev mailing list