[ovs-discuss] OVS-DPDK vhostuser guest ping issue
Rapelly, Varun
vrapelly at sonusnet.com
Fri Jan 29 05:00:43 UTC 2016
Yes, I would like to use IVSHMEM to communicate between host and guest VM. In guest VM, DPDK application is running [with 2MB hugepages], which processes the packets.
I'm using QEMU emulator version 2.2.1. Do I need to apply any patch for qemu [It is mentioned in INSTALL.DPDK.nd] to use this feature?
If the answer for the above is yes, then in below link, openvswitch related tar bundles were updated 2 years back. Which one to pick?
https://01.org/packet-processing/downloads
Thanks &Regards,
Varun
-----Original Message-----
From: Loftus, Ciara [mailto:ciara.loftus at intel.com]
Sent: Thursday, January 28, 2016 10:29 PM
To: Rapelly, Varun <vrapelly at sonusnet.com>
Cc: discuss at openvswitch.org
Subject: RE: OVS-DPDK vhostuser guest ping issue
> Hi Loftus,
>
> It was other configuration issue. After resolving that it worked fine.
>
> Could you please let me know how to launch ovs-vswitchd using DPDK
> IVSHMEM?
>
> I'm using below command to launch ovs-vswitchd to use DPDK IVSHMEM
> ----------------------------------------------------------------------
> ------------------------
> -------
> ovs-vswitchd --dpdk -c 0xf -n 4 --proc-type=primary --huge-dir
> /dev/hugepages --socket-mem 1024,0 -- unix:$DB_SOCK -vconsole:emer -
> vsyslog:err -vfile:info --mlockall --no-chdir --log-
> file=/usr/local/var/log/openvswitch/ovs-vswitchd.log --pidfile -detach
>
> without IVSHMEM
> ----------------------------------------------------------------------
> ------------------------
> -------
> ovs-vswitchd --dpdk -c 0x1 -n 4 --socket-mem 1024,0 -- unix:$DB_SOCK -
> vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir --log-
> file=/usr/local/var/log/openvswitch/ovs-vswitchd.log --pidfile -detach
>
> When I launched with the above args [with IVSHMEM], getting following
> message in ovs-vswitchd log:
>
> EAL: VFIO modules not all loaded, skip VFIO support...
> EAL: Searching for IVSHMEM devices...
> EAL: No IVSHMEM configuration found!
> EAL: Setting up memory...
> EAL: Ask a virtual area of 0x400000000 bytes
This log is normal.
>
> I followed the remaining steps as per INSTALL.DPDK.md, but little
> confused with IVSHMEM configuration.
What is your intention? Do you wish to use IVSHM to communicate with a VM? If so I recommend you refer to the steps in INSTALL.DPDK explaining 'DPDK Rings' / 'dpdkr' ports.
Ciara
>
> Thanks in advance.
>
> -----Original Message-----
> From: Loftus, Ciara [mailto:ciara.loftus at intel.com]
> Sent: Tuesday, January 19, 2016 2:51 PM
> To: Rapelly, Varun <vrapelly at sonusnet.com>; discuss at openvswitch.org
> Subject: RE: OVS-DPDK vhostuser guest ping issue
>
> >
> > Hi All,
> > Â I'm facing a following issue with OVS-DPDK dpdkvhostuser port. I
> > was able to create ovs bridge with dpdkvhostuser port types and able
> > to ping the gateway from ovs bridges on the host. But when I'm
> > creating guest VM using dpdkvhostuser port type, not able to ping
> > gateway on guest VM. Not seeing any error logs in vswitchd log.
> > Â Following are the list of commands that I used:
> > Â [root at kujo ~]# ovs-vsctl --no-wait add-br pkt1 -- set Bridge pkt1
> > datapath_type=netdev [root at kujo ~]# ovs-vsctl add-port pkt1 dpdk0 --
> > set Interface dpdk0 type=dpdk [root at kujo ~]# ovs-vsctl add-port pkt1
> > vhostuser0 -- set Interface
> > vhostuser0 type=dpdkvhostuser
> > [root at kujo ~]#Â qemu-system-x86_64 -smp 4 -boot d -cdrom TinyCore-
> > current.iso -m 512 TinyCore-current.iso -boot d -name varun -object
> > memory-backend-file,id=mem,size=8192M,mem-
> > path=/dev/hugepages,share=on -mem-prealloc -chardev
> > socket,id=char1,path=/usr/local/var/run/openvswitch/vhostuser0
> > -netdev type=vhost-user,id=mynet1,chardev=char1,vhostforce -device
> > virtio-net-
> > pci,mac=52:55:00:00:20:11,netdev=mynet1 -daemonize
> > qemu-system-x86_64: -netdev type=vhost-
> > user,id=mynet1,chardev=char1,vhostforce: chardev "char1" went up
> > WARNING: Image format was not specified for 'TinyCore-current.iso'
> > and probing guessed raw.
> > Â Â Â Â Â Â Â Â Automatically detecting the format is dangerous for raw
> > images, write operations on block 0 will be restricted.
> > Â Â Â Â Â Â Â Â Specify the 'raw' format explicitly to remove the restrictions.
> > VNC server running on `::1:5900'
> > [root at kujo ~]# ifconfig pkt1 10.54.218.88 netmask 255.255.255.0 up
> > [root at kujo ~]# ping -I pkt1 10.54.218.1 [on host] PING 10.54.218.1
> > (10.54.218.1) from 10.54.218.88 pkt1: 56(84) bytes of data.
> > 64 bytes from 10.54.218.1: icmp_seq=1 ttl=255 time=11.7 ms
> > 64 bytes from 10.54.218.1: icmp_seq=2 ttl=255 time=0.930 ms ^C
> > --- 10.54.218.1 ping statistics ---
> > 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt
> > min/avg/max/mdev = 0.930/6.351/11.773/5.422 ms [root at kujo ~]#
> > ovs-vsctl show 2a8a86f3-b813-43a4-826e-dd778aafbcec
> > Â Â Â Bridge "pkt1"
> > Â Â Â Â Â Â Â Port "pkt1"
> > Â Â Â Â Â Â Â Â Â Â Â Interface "pkt1"
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â type: internal
> > Â Â Â Â Â Â Â Port "dpdk0"
> > Â Â Â Â Â Â Â Â Â Â Â Interface "dpdk0"
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â type: dpdk
> > Â Â Â Â Â Â Â Port "vhostuser0"
> > Â Â Â Â Â Â Â Â Â Â Â Interface "vhostuser0"
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â type: dpdkvhostuser
> >
> > [root at kujo ~]# ovs-ofctl dump-flows pkt1 NXST_FLOW reply (xid=0x4):
> > cookie=0x0, duration=86.627s, table=0, n_packets=89, n_bytes=8446,
> > idle_age=0, priority=0 actions=NORMAL
> >
> > [root at kujo ~]# ovs-ofctl dump-ports pkt1 OFPST_PORT reply (xid=0x2):
> > 3 ports
> > Â port LOCAL: rx pkts=11, bytes=830, drop=0, errs=0, frame=0,
> > over=0,
> > crc=0
> > Â Â Â Â Â Â Â Â Â Â tx pkts=5, bytes=434, drop=0, errs=0, coll=0
> >  port 1: rx pkts=86, bytes=8638, drop=0, errs=0, frame=0, over=0,
> > crc=0
> > Â Â Â Â Â Â Â Â Â Â tx pkts=11, bytes=928, drop=0, errs=0, coll=0
> >  port 2: rx pkts=0, bytes=?, drop=?, errs=?, frame=?, over=?, crc=?
> > Â Â Â Â Â Â Â Â Â Â tx pkts=0, bytes=?, drop=11, errs=?, coll=?
> >
> > When i'm pinging the guest VM IP [10.54.218.244], I could see the
> > packets coming on ovs bridge interface.
> > Â [root at kujo ~]# ifconfig pkt1
> > pkt1: flags=323<UP,BROADCAST,RUNNING,PROMISC>Â mtu 1500
> > Â Â Â Â Â Â Â inet 10.54.218.88Â netmask 255.255.255.0Â broadcast
> > 10.54.218.255
> > Â Â Â Â Â Â Â inet6 fe80::e611:5bff:fe98:962Â prefixlen 64Â scopeid
> > 0x20<link>
> > Â Â Â Â Â Â Â ether e4:11:5b:98:09:62Â txqueuelen 500Â (Ethernet)
> > Â Â Â Â Â Â Â RX packets 10Â bytes 850 (850.0 B)
> > Â Â Â Â Â Â Â RX errors 0Â dropped 0Â overruns 0Â frame 0
> > Â Â Â Â Â Â Â TX packets 11Â bytes 830 (830.0 B)
> > Â Â Â Â Â Â Â TX errors 0Â dropped 0 overruns 0Â carrier 0Â collisions 0
> >
> > [root at kujo ~]# tcpdump -i pkt1
> > tcpdump: verbose output suppressed, use -v or -vv for full protocol
> > decode listening on pkt1, link-type EN10MB (Ethernet), capture size
> > 65535 bytes
> > 11:01:36.852756 ARP, Request who-has 10.54.218.244 tell 10.54.218.1,
> > length
> > 46
> > 11:01:41.581666 ARP, Request who-has 10.54.218.244 tell 10.54.218.1,
> > length
> > 46
> > ^C
> > 2 packets captured
> > 2 packets received by filter
> > 0 packets dropped by kernel
> >
> > [root at kujo ~]# route -n
> > Kernel IP routing table
> > Destination    Gateway        Genmask        Flags Metric Ref Use
> > Iface
> > 0.0.0.0Â Â Â Â Â Â Â Â 10.54.28.1Â Â Â Â Â 0.0.0.0Â Â Â Â Â Â Â Â UGÂ Â Â 100Â Â Â 0
> > 0 eno1
> > 10.54.28.0Â Â Â Â Â 0.0.0.0Â Â Â Â Â Â Â Â 255.255.254.0Â Â UÂ Â Â Â 100Â Â Â 0
> > 0 eno1
> > 10.54.218.0Â Â Â Â 0.0.0.0Â Â Â Â Â Â Â Â 255.255.255.0Â Â UÂ Â Â Â 0Â Â Â Â Â 0
> > 0 pkt1
> > 192.168.122.0Â Â 0.0.0.0Â Â Â Â Â Â Â Â 255.255.255.0Â Â UÂ Â Â Â 0Â Â Â Â Â 0
> > 0 virbr0
> >
> > Please give me some points to debug this issue. Few months back I
> > used the same steps on the same host, it worked fine. I didn't face
> > this kind of
> issue.
>
> What has changed in your setup since then? OVS/DPDK commit ID etc?
>
> Thanks,
> Ciara
>
> > Thanks in advance.
> >
> > Regards,
> > Varun
> >
> >
> >
> > Regards,
> > Varun
More information about the discuss
mailing list