<div dir="ltr">Ping<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 28, 2021 at 11:17 AM Andrew Melnychenko <<a href="mailto:andrew@daynix.com">andrew@daynix.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This series of patches add RSS property support for virtio-net-pci.<br>
<br>
Virtio RSS effectively works with TAP devices, it requires additional<br>
vectors for VirtioNet, queues for TAP device, and vCPU cores.<br>
Example of device configuration:<br>
```<br>
<interface type="network"><br>
<mac address="52:54:00:c4:90:25"/><br>
<source network="default"/><br>
<model type="virtio"/><br>
<driver name="qemu" queues="9" rss="on" rss_hash_report="off"/><br>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/><br>
</interface><br>
```<br>
<br>
Capability "rss" enables RSS, "rss_hash_report" - enables hashes in vheader.<br>
Qemu uses eBPF program as RSS driver.<br>
For loading RSS eBPF program, the helper is used.<br>
Path to the helper is provided by Qemu through "query-helper-paths" qmp command.<br>
The helper "qemu-ebpf-rss-helper" is built with Qemu and may differ from build to build.<br>
So it's required that the Qemu should provide a proper helper path.<br>
Libvirt would call the helper and receive the program and map fd through unix socket.<br>
Fds would be passed to Qemu in "ebpf_rss_fds" property by passing to child process or unix socket.<br>
If libvirt would fail at helper call or Qemu didn't provide the path,<br>
the Qemu would be launched without "ebpf_rss_fds" property.<br>
Without "ebpf_rss_fds" property, Qemu would try to load eBPF program by<br>
itself - usually, it would require additional system permissions.<br>
Qemu may use "in-qemu" RSS as a fallback option, which will not require system<br>
permissions, but doesn't work with vhost TAP.<br>
<br>
Qemu patches: <a href="https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg03535.html" rel="noreferrer" target="_blank">https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg03535.html</a><br>
<br>
Andrew Melnychenko (10):<br>
domain_conf: Added configs for RSS and Hash report.<br>
qemu_capabilities: Added capabilites for qemu's "rss" and "hash".<br>
qemu_command: Added "rss" and "hash" properties.<br>
virsocket: Added receive for multiple fds.<br>
qemu_capabilities: Added capability for qemu's "ebpf_rss_fds".<br>
qemu_capabilities: Added capability for ebpf helper path.<br>
qemu_interface: Added ebpf helper call.<br>
qemu_command: Added ebpf RSS helper call for NIC creation.<br>
qemu_hotplug: Added helper call for hotplug NIC.<br>
docs: Added descriptions for "rss" and "rss_hash_report"<br>
configurations.<br>
<br>
docs/formatdomain.rst | 16 +++++++<br>
src/conf/domain_conf.c | 31 +++++++++++++-<br>
src/conf/domain_conf.h | 2 +<br>
src/libvirt_private.syms | 1 +<br>
src/qemu/qemu_capabilities.c | 48 +++++++++++++++++++++<br>
src/qemu/qemu_capabilities.h | 5 +++<br>
src/qemu/qemu_command.c | 46 +++++++++++++++++++-<br>
src/qemu/qemu_command.h | 2 +<br>
src/qemu/qemu_hotplug.c | 30 ++++++++++++-<br>
src/qemu/qemu_interface.c | 54 +++++++++++++++++++++++<br>
src/qemu/qemu_interface.h | 2 +<br>
src/qemu/qemu_monitor.c | 9 ++++<br>
src/qemu/qemu_monitor.h | 3 ++<br>
src/qemu/qemu_monitor_json.c | 50 ++++++++++++++++++++++<br>
src/qemu/qemu_monitor_json.h | 3 ++<br>
src/qemu/qemu_validate.c | 16 +++++++<br>
src/util/virsocket.c | 83 ++++++++++++++++++++++++++++++++++++<br>
src/util/virsocket.h | 2 +<br>
18 files changed, 399 insertions(+), 4 deletions(-)<br>
<br>
-- <br>
2.31.1<br>
<br>
</blockquote></div>