126.96.36.199. Setting NIC driver-specific options
Some NICs may have tunable driver-specific options. These options are set as attributes of the
driver sub-element of the interface definition. These options are set by using management tools to configuring the following sections of the domain XML:
<devices> <interface type='network'> <source network='default'/> <target dev='vnet1'/> <model type='virtio'/> <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off'/> </interface> </devices> ...
Figure 20.47. Devices - network interfaces- setting NIC driver-specific options
Currently the following attributes are available for the "virtio" NIC driver:
Table 20.19. virtio NIC driver elements
name attribute forces which type of back-end driver to use. The value can be either
qemu (a user-space back end) or
vhost (a kernel back end, which requires the vhost module to be provided by the kernel); an attempt to require the vhost driver without kernel support will be rejected. The default setting is
vhost if the vhost driver present, but will silently fall back to
qemu if not.
|Specifies how to handle transmission of packets when the transmit buffer is full. The value can be either
timer. If set to
iothread, packet tx is all done in an iothread in the bottom half of the driver (this option translates into adding
"tx=bh" to the
qemu commandline -device virtio-net-pci option). If set to
timer, tx work is done in qemu, and if there is more tx data than can be sent at the present time, a timer is set before qemu moves on to do other things; when the timer fires, another attempt is made to send more data. In general you should leave this option alone, unless you are very certain you that changing it is an absolute necessity.
|Allows users to set domain I/O asynchronous handling for interface device. The default is left to the discretion of the hypervisor. Accepted values are
off . Enabling this option allows qemu to execute a guest virtual machine while a separate thread handles I/O. Typically guest virtual machines experiencing high system CPU utilization during I/O will benefit from this. On the other hand, overloading the physical host physical machine may also increase guest virtual machine I/O latency. Therefore, you should leave this option alone, unless you are very certain you that changing it is an absolute necessity.
|The event_idx attribute controls some aspects of device event processing. The value can be either
on, reduces the number of interrupts and exits for the guest virtual machine. The default is
on. In case there is a situation where this behavior is suboptimal, this attribute provides a way to force the feature off. You should leave this option alone, unless you are very certain you that changing it is an absolute necessity.