[ovs-discuss] dpdk vhostuser port not working

haris tanvir haristanvir at hotmail.com
Wed Nov 25 12:11:55 UTC 2015


Hi,Now i used qemu (rather than libvirt) to spawn VM with following parameters and it vhostuser works now:
qemu-system-x86_64 -smp 8 -hda /Twister_Image_dir/Twister_Image -m 8192 -cpu host --enable-kvm -name haris -vnc :1 -object memory-backend-file,id=mem,size=8192M,mem-path=/dev/huge,share=on -numa node,memdev=mem -mem-prealloc -chardev socket,id=char1,path=/usr/local/var/run/openvswitch/dpdkvhost0 -netdev type=vhost-user,id=mynet1,chardev=char1,vhostforce -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1 -daemonize

Please let me know if i am doing something wrong with the following libvirt tag:
  <name>haris2</name>  <uuid>02ed97cb-ad30-4116-9732-17882247e1fb</uuid>  <memory unit='KiB'>4112384</memory>  <currentMemory unit='KiB'>4112384</currentMemory>  <memoryBacking>    <hugepages/>  </memoryBacking>
    <interface type='vhostuser'>      <mac address='52:54:00:3b:83:1a'/>      <source type='unix' path='/usr/local/var/run/openvswitch/dpdkvhost0' mode='client'/>      <model type='virtio'/>      <alias name='net2'/>      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>    </interface>
P.S: it is detected by the VM in the case of libvirt as well, however, when i use libvirt, no traffic passes to VM. May be I am not passing something necessary in the libvirt tag which I am passing in the qemu parameters. If you do notice, please let me know
ThanksRegardsHaris Tanvir
 

> From: ciara.loftus at intel.com
> To: haristanvir at hotmail.com
> CC: discuss at openvswitch.org
> Subject: RE: [ovs-discuss] dpdk vhostuser port not working
> Date: Wed, 25 Nov 2015 10:49:22 +0000
> 
> > 
> > 
> > Thanks Ciara for reply
> > Yea i Assigned dpdkvhost port to a VM using libvirt. Following was the Tag i
> > used
> > 
> > <interface type='vhostuser'>
> >       <source type='unix' path='/var/openvswitch/dpdkvhost0.sock'
> I'm not sure if the ".sock" is necessary here. The name of the file should correspond to the port name, so it should just be /var/openvswitch/dpdkvhost0. Check this directory to confirm.
> 
> > mode='client'/>
> >       <mac address='52:54:00:3b:83:1a'/>
> >       <model type='virtio'/>
> >    </interface>
> > 
> > This is what i get in a VM as a result
> > 
> > 00:07.0 Ethernet Contoller: Red Hat, Inc Virtio network device
> > 
> > This is eth0 interface inside VM.
> > When i "tcpdump -i eth0" in a VM, i receive no packets, even though my ovs-
> > bridge is receiving packets.
> 
> Do you see either of the following logs?:
> INFO|vHost Device '/var/run/openvswitch/dpdkvhost0' 0 has been added
> INFO|vHost Device '/var/run/openvswitch/dpdkvhost0' can't be added - name not found
> 
> Thanks,
> Ciara
> 
> > 
> > 
> > 
> > > From: ciara.loftus at intel.com
> > > To: haristanvir at hotmail.com
> > > CC: discuss at openvswitch.org
> > > Subject: RE: [ovs-discuss] dpdk vhostuser port not working
> > > Date: Wed, 25 Nov 2015 10:29:24 +0000
> > >
> > > > Hi,
> > > > I am using ovs 2.4.0. I have added 1 physical dpdk port and 4 vhostuser
> > ports.
> > > > Following is my bridge:
> > > >     Bridge "br0"
> > > >         Port "dpdkvhost3"
> > > >             Interface "dpdkvhost3"
> > > >                 type: dpdkvhostuser
> > > >         Port "dpdk0"
> > > >             Interface "dpdk0"
> > > >                 type: dpdk
> > > >         Port "br0"
> > > >             Interface "br0"
> > > >                 type: internal
> > > >         Port "dpdkvhost1"
> > > >             Interface "dpdkvhost1"
> > > >                 type: dpdkvhostuser
> > > >         Port "dpdkvhost0"
> > > >             Interface "dpdkvhost0"
> > > >                 type: dpdkvhostuser
> > > > However, the traffic is only received by the physcal ports and NOT by
> > > > dpdkvhostuser ports. As you can see below that there are no Rx packets
> > on
> > > > any port other than port1(physical port)
> > > >   port  4: rx pkts=0, bytes=?, drop=?, errs=?, frame=?, over=?, crc=?
> > > >            tx pkts=0, bytes=?, drop=1511, errs=?, coll=?
> > > >   port LOCAL: rx pkts=337, bytes=32050, drop=0, errs=0, frame=0, over=0,
> > > > crc=0
> > > >            tx pkts=5856, bytes=379808, drop=281, errs=0, coll=0
> > > >   port  1: rx pkts=7419, bytes=505712, drop=0, errs=0, frame=0, over=0,
> > crc=0
> > > >            tx pkts=336, bytes=33604, drop=0, errs=0, coll=0
> > > >   port  2: rx pkts=0, bytes=?, drop=?, errs=?, frame=?, over=?, crc=?
> > > >            tx pkts=0, bytes=?, drop=6944, errs=?, coll=?
> > > >   port  3: rx pkts=0, bytes=?, drop=?, errs=?, frame=?, over=?, crc=?
> > > >            tx pkts=0, bytes=?, drop=4604, errs=?, coll=?
> > > >
> > > > Following is the only flow in my bridge:
> > > > NXST_FLOW reply (xid=0x4):
> > > >  cookie=0x0, duration=8763.150s, table=0, n_packets=1969,
> > n_bytes=127366,
> > > > idle_age=14, actions=FLOOD
> > > >
> > > >
> > > > Does anyone know why I am not receiving any traffic on other ports?
> > >
> > > Have you brought up VMs with vhost-user ports successfully? dpdkvhost
> > receive function will not succeed until a VM with the associated socket is
> > detected.
> > >
> > > Launch QEMU with the following (repeat for each dpdkvhostuser port):
> > > -chardev
> > socket,id=char1,path=/usr/local/var/run/openvswitch/dpdkvhost0
> > > -netdev type=vhost-user,id=mynet1,chardev=char1,vhostforce
> > > -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1
> > >
> > > Please see INSTALL.DPDK.md for further instructions.
> > >
> > > If you have already gotten this far, have you seen any errors? You can
> > enable RTE_LIBRTE_VHOST_DEBUG=y in DPDK to get some more clues.
> > >
> > > Thanks,
> > > Ciara
> > >
> > > >
> > > > Regards
> > > > Haris Tanvir
> > > >
> > > >
> > > >
> > > >
> > > >
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20151125/9ce1e50e/attachment-0002.html>


More information about the discuss mailing list