On Wed, Dec 16, 2020 at 8:43 PM Pai G, Sunil <[email protected]> wrote:
>
> Hi Zhang,
> Please see comments inline.
>
>
> > -----Original Message-----
> > From: Tonghao Zhang <[email protected]>
> > Sent: Wednesday, December 16, 2020 7:56 AM
> > To: Pai G, Sunil <[email protected]>
> > Cc: Ilya Maximets <[email protected]>; ovs dev <[email protected]>;
> > David Marchand <[email protected]>; Stokes, Ian
> > <[email protected]>; Richardson, Bruce <[email protected]>
> > 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 <[email protected]>
> > wrote:
> > >
> > > Hi Zhang,
> > >
> > > Could you give this patch a try as well ?
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/patch/20201215164128.1
> > > [email protected]/ 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 <[email protected]>
> >
> > 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 ?
Yes, I use the dpdk helloworld to test.
./build/helloworld -n 4 -c 4 -a
0000:82:00.0,dv_flow_en=1,dv_esw_en=1,l3_vxlan_en=1,dv_xmeta_en=2,representor=[0-2]
EAL: Detected 56 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Probe PCI driver: mlx5_pci (15b3:101d) device: 0000:82:00.0 (socket 1)
common_mlx5: RTE_MEM is selected.
mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000.
EAL: No legacy callbacks, legacy socket not created
hello from core 2
But there is error in ovs:
$ ovs-vsctl show
a360a9ac-d269-4e89-b01c-c09331b9fb00
Bridge br-int
datapath_type: netdev
Port tun
Interface tun
type: vxlan
options: {key=flow, local_ip="10.96.74.2", remote_ip=flow}
Port br-int
Interface br-int
type: internal
Port rep1
Interface rep1
type: dpdk
options: {dpdk-devargs="0000:82:00.0,representor=[1]"}
error: "Error attaching device
'0000:82:00.0,representor=[1]' to DPDK"
ovs-vswitchd log:
2020-12-15T21:20:41.703Z|00333|netdev|WARN|rep1: could not set
configuration (Invalid argument)
2020-12-15T21:20:41.703Z|00334|dpdk|ERR|Invalid port_id=256
2020-12-15T21:20:41.703Z|00335|dpdk|ERR|EAL: failed to parse device
"0000:82:00.0"
2020-12-15T21:20:41.703Z|00336|dpdk|ERR|EAL: failed to parse device
"0000:82:00.0"
2020-12-15T21:20:41.703Z|00337|dpdk|ERR|EAL: Failed to attach device
on primary process
2020-12-15T21:20:41.703Z|00338|netdev_dpdk|WARN|Error attaching device
'0000:82:00.0,representor=[0]' to DPDK
One question, did you attach a dpdk port to ovs ?
ovs commit-id:
af06184705072804a4c1374f9c824c9e4c241c26
dpdk-next-net
d3fa7b89f0b893f051cb4cef1cbc961cb59f5721
systeminfo
CentOS Linux release 7.6.1810 (Core)
kernel 3.10.0-957.1.3.el7.x86_64
>
> >
> > > > -----Original Message-----
> > > > From: Richardson, Bruce <[email protected]>
> > > > Sent: Tuesday, December 15, 2020 7:09 PM
> > > > To: Tonghao Zhang <[email protected]>
> > > > Cc: Ilya Maximets <[email protected]>; Pai G, Sunil
> > > > <[email protected]>; ovs dev <[email protected]>; David
> > > > Marchand <[email protected]>; Stokes, Ian
> > > > <[email protected]>
> > > > 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-
> > > > > > > [email protected]/
> > > > > > > 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
--
Best regards, Tonghao
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev