In the last few days, Open-vSwitch 2.4 was released.
Release notes can be found here.
Since i’m interested in working with vhost user space interfaces, but with the file descriptor method, rather than cuse, I want clarify some changes from my previous post. I would like to update regarding the needed configuration.
Latest version
No need to use any patches anymore. Just download the latest tarball. Follow the instructions in install.DPDK to build the dpdk & open-vswitch. Everything is working straight out of the box.
VM configuration file
If using dpdkvhostuser type ports, there is no need for the Qemu wrapper. This simplifies the VM xml file. The wrapper should be used when using Cuse.
Libvirt
No need to pass special qemu arguments. This is a security breach: bypassing libvirt with direct arguments to qemu. Libvirt is now supporting vhostuser, and hugepages backend sharing. So instead of Qemu:Args arguments, use new arguments follows:
<memoryBacking> <hugepages> <page size='1024' unit='MiB'/> </hugepages> </memoryBacking> <cpu> <numa> <cell id='0' cpus='0-1' memory='3064' unit='MiB' memAccess='shared'/> </numa> </cpu>
<interface type='vhostuser'> <source type='unix' path='/var/openvswitch/dpdkvhost0.sock' mode='client'/> <mac address='52:54:00:3b:83:1a'/> <model type='virtio'/> </interface>
Great sharing … May we know your exact CentOS environment with QEMU and libvirt versions and how you upgrade them together? Thanks!
By default, the package versions of my CentOS 7.1 via yum update are as below.
virsh # version
Compiled against library: libvirt 1.2.8
Using library: libvirt 1.2.8
Using API: QEMU 1.2.8
Running hypervisor: QEMU 1.5.3
After a non-official release link and upgrade QEMU to 2.2.0 (https://repos.fedorapeople.org/repos/openstack/.virt-upstream-el7/), we still could not run Open-vSwitch netdev-dpdk with vhost-user support in VM.
Thank’s for a good sharing, I have however not gotten it to work this way always get the error: unable to map backing store for hugepages: Cannot allocate memory
Check your qemu/libvirt configuration to point to the right hugepage mount, as appears in your fstab.
I have the same problem (DPDK 2.2.0; OVS 2.5.0; Fedora 23).
qemu-system-x86_64: -object memory-backend-file,id=mem,size=3072M,mem-path=/dev/hugepages,share=on: unable to map backing store for hugepages: Cannot allocate memory
1. Can you provide more details – how to check qemu/libvirt config?
2. Can you post your whole VM xml file?
Thanks
Just figured out that I missed “–socket-mem 1024,0” in the ovs-vswitchd command.
With “sudo ./ovs-vswitchd –dpdk -c 0x1 -n 4 –socket-mem 1024,0 — unix:$DB_SOCK –pidfile –detach”, the problem is gone.