I work mostly in OpenStack on enabling ovs with dpdk.
When deploying vms on host running ovs with dpdk vms are booted utilizing
Qemu support creating vms with vhost-user network interfaces as of v2.1.
Libvirt currently has support for requesting the use of vhost-user interfaces by added the following xml fragment
<source type='unix' path='/var/run/openvswitch/vhuf1204e0c-98' mode='client'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
Send traffic via a vhost-user interface, the vhost-user frontend (provided by qemu) must share
the virtios ring to the vhost-backed via passing a file descript to the memory backing object
of the qemu instance as part of the port creation.
Today the only native way to request Libvirt to create a vm who’s memory is backed by a memdev which can be
Accessed via a file descriptor is to request hugepage backed memory. This requires the operator to
Manage and configure hugepage on each of their compute hosts and take special care to ensure that vms are
Not placed on host were vhost-user interface are used if they do not request hugepages.
Today it is possible to use Libvirt to spawn a vm without hugepage memory and a file descriptor backed memdev
Via the use of the qemu:commandline element.
I created a proof of concept patch to nova to demonstrate that this works however to support this usecase in
Nova a new xml element is required.
I would like to propose the introduction of a new subelemnt to the memorybacking element to request file discrptro backed memory
<filedescriptor size_mb=”1024” path=”/var/lib/libvirt/qemu” prealloc=”true” shared=”on” />
The above filedescriptor xml fragment above would then be parsed to generate the same qemu argument as the qemu:commandline fragment
Therefor allowing the creation of a vm with vhost-user interface without hugepage memory backing.
Before I start looking at the Libvirt code base I wanted to ask if the Libvirt community would be open to this change and what would be the best way
To approach enabling this feature.