only for ``vhostuser`` type. :since:`Since 3.7.0 (QEMU and KVM only)`
**In general you should leave this option alone, unless you are very certain
you know what you are doing.**
+``rss``
+ The ``rss`` option enables in-qemu/ebpf RSS for virtio NIC. RSS works with
+ virtio and tap backends only. Virtio NIC will be launched with "rss"
+ property. For now "in-qemu" RSS is supported by libvirt.
+ QEMU may load eBPF RSS if it has CAP_SYS_ADMIN permissions, which is
+ not supported by default in libvirt.
+ **In general you should leave this option alone, unless you are very certain
+ you know what you are doing. Proper RSS configuration depends from vcpu,
+ tap, and vhost settings.**
+``rss_hash_report``
+ The ``rss_hash_report`` option enables in-qemu RSS hash report for virtio
+ NIC. Virtio NIC will be launched with a "hash" property. Network packets provided
+ to VM will contain a hash of the packet in the virt header. Usually enabled
+ alongside with ``rss``. Without ``rss`` option, the hash report doesn't affect
+ steering itself but provides vnet header with a calculated hash.
+ **In general you should leave this option alone, unless you are very certain
+ you know what you are doing. Proper RSS configuration depends from vcpu,
+ tap, and vhost settings.**
virtio options
For virtio interfaces, `Virtio-specific options <#elementsVirtio>`__ can also
be set. ( :since:`Since 3.5.0` )
&def->driver.virtio.tx_queue_size) < 0)
goto error;
+ if (virXMLPropTristateSwitch(driver_node, "rss",
+ VIR_XML_PROP_NONE,
+ &def->driver.virtio.rss) < 0)
+ goto error;
+
+ if (virXMLPropTristateSwitch(driver_node, "rss_hash_report",
+ VIR_XML_PROP_NONE,
+ &def->driver.virtio.rss_hash_report) < 0)
+ goto error;
+
if ((tmpNode = virXPathNode("./driver/host", ctxt))) {
if (virXMLPropTristateSwitch(tmpNode, "csum", VIR_XML_PROP_NONE,
&def->driver.virtio.host.csum) < 0)
if (def->driver.virtio.tx_queue_size)
virBufferAsprintf(buf, " tx_queue_size='%u'",
def->driver.virtio.tx_queue_size);
+ if (def->driver.virtio.rss != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(buf, " rss='%s'",
+ virTristateSwitchTypeToString(def->driver.virtio.rss));
+ }
+ if (def->driver.virtio.rss_hash_report != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(buf, " rss_hash_report='%s'",
+ virTristateSwitchTypeToString(def->driver.virtio.rss_hash_report));
+ }
virDomainVirtioOptionsFormat(buf, def->virtio);
}
virTristateSwitch ecn;
virTristateSwitch ufo;
} guest;
+ virTristateSwitch rss;
+ virTristateSwitch rss_hash_report;
} virtio;
} driver;
struct {
</optional>
</element>
</optional>
+ <optional>
+ <attribute name="rss">
+ <ref name="virOnOff"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="rss_hash_report">
+ <ref name="virOnOff"/>
+ </attribute>
+ </optional>
</interleave>
</element>
</optional>
--- /dev/null
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <disk type='block' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <interface type='user'>
+ <mac address='00:11:22:33:44:55'/>
+ <model type='virtio'/>
+ <driver rss='on'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='00:11:22:33:44:66'/>
+ <model type='virtio'/>
+ <driver rss_hash_report='on'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='00:11:22:33:44:77'/>
+ <model type='virtio'/>
+ <driver rss='off' rss_hash_report='on'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </interface>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <audio id='1' type='none'/>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
<interface type='user'>
<mac address='52:54:56:58:5a:5c'/>
<model type='virtio'/>
- <driver iommu='on' ats='on' packed='on' page_per_vq='on'/>
+ <driver rss='on' rss_hash_report='on' iommu='on' ats='on' packed='on' page_per_vq='on'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</interface>
<input type='mouse' bus='virtio'>
--- /dev/null
+../qemuxml2argvdata/net-virtio-rss.xml
\ No newline at end of file
DO_TEST_NOCAPS("net-many-models");
DO_TEST("net-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA);
DO_TEST("net-vdpa-multiqueue", QEMU_CAPS_NETDEV_VHOST_VDPA);
+ DO_TEST_CAPS_LATEST("net-virtio-rss");
DO_TEST_NOCAPS("serial-tcp-tlsx509-chardev");
DO_TEST_NOCAPS("serial-tcp-tlsx509-chardev-notls");