[PATCH 0/3] VirtioNet RSS support

Andrew Melnychenko andrew at daynix.com
Thu Dec 30 06:01:42 UTC 2021


This series of patches add RSS property support for virtio-net-pci.

Virtio RSS effectively works with TAP devices, it requires additional
vectors for VirtioNet, queues for TAP device, and vCPU cores.
Example of device configuration:
```
<interface type="network">
  <mac address="52:54:00:c4:90:25"/>
  <source network="default"/>
  <model type="virtio"/>
  <driver name="qemu" queues="9" rss="on" rss_hash_report="off"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
```

Capability "rss" enables RSS, "rss_hash_report" - enables hashes in vheader.
For now, "rss" property will trigger "in-qemu" RSS in most cases.
Current Qemu(6.2) supports eBPF RSS that may require additional capabilities.
In future, the helper will be provided. And this code is the base for VirtIO RSS.

Changes since RFC:
 * rebased and refactored
 * added tests
 * postponed the helper

Andrew Melnychenko (3):
  domain_conf: Added configs for RSS and Hash report.
  qemu_capabilities: Added capabilites for qemu's "rss" and "hash".
  test: Added caps, xml2argv and xml2xml tests.

 docs/formatdomain.rst                         | 15 ++++++++
 docs/schemas/domaincommon.rng                 | 10 ++++++
 src/conf/domain_conf.c                        | 31 +++++++++++++++-
 src/conf/domain_conf.h                        |  2 ++
 src/qemu/qemu_capabilities.c                  |  2 ++
 src/qemu/qemu_capabilities.h                  |  1 +
 src/qemu/qemu_command.c                       |  2 ++
 src/qemu/qemu_validate.c                      | 16 +++++++++
 .../caps_5.1.0.x86_64.xml                     |  1 +
 .../caps_5.2.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_5.2.0.ppc64.xml |  1 +
 .../caps_5.2.0.riscv64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_5.2.0.s390x.xml |  1 +
 .../caps_5.2.0.x86_64.xml                     |  1 +
 .../caps_6.0.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_6.0.0.s390x.xml |  1 +
 .../caps_6.0.0.x86_64.xml                     |  1 +
 .../caps_6.1.0.x86_64.xml                     |  1 +
 .../caps_6.2.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |  1 +
 .../caps_6.2.0.x86_64.xml                     |  1 +
 tests/qemuxml2argvdata/net-virtio-hash.args   | 35 +++++++++++++++++++
 tests/qemuxml2argvdata/net-virtio-hash.xml    | 29 +++++++++++++++
 tests/qemuxml2argvdata/net-virtio-rss.args    | 35 +++++++++++++++++++
 tests/qemuxml2argvdata/net-virtio-rss.xml     | 29 +++++++++++++++
 .../qemuxml2argvdata/net-virtio-rsshash.args  | 35 +++++++++++++++++++
 tests/qemuxml2argvdata/net-virtio-rsshash.xml | 29 +++++++++++++++
 .../virtio-options.x86_64-latest.args         |  2 +-
 tests/qemuxml2argvdata/virtio-options.xml     |  2 +-
 tests/qemuxml2argvtest.c                      |  7 ++++
 30 files changed, 292 insertions(+), 3 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/net-virtio-hash.args
 create mode 100644 tests/qemuxml2argvdata/net-virtio-hash.xml
 create mode 100644 tests/qemuxml2argvdata/net-virtio-rss.args
 create mode 100644 tests/qemuxml2argvdata/net-virtio-rss.xml
 create mode 100644 tests/qemuxml2argvdata/net-virtio-rsshash.args
 create mode 100644 tests/qemuxml2argvdata/net-virtio-rsshash.xml

-- 
2.34.1




More information about the libvir-list mailing list