an be retrieved using QAPI.
To load eBPF program - administrative capabilities are required, so Libvirt may
load it and pass it to the QEMU instance.
For now, there is only "RSS"(Receive Side Scaling) for virtio-net eBPF program
and maps.
Signed-off-by: Andrew Melnychenko
---
src/qemu
Added logic for loading the "RSS" eBPF program.
eBPF file descriptors passed to the QEMU.
Signed-off-by: Andrew Melnychenko
---
src/qemu/qemu_command.c | 53 +
src/qemu/qemu_domain.c | 4
src/qemu/qemu_domain.h | 3 +++
3 files c
Also, added dependencies for libbpf with bpf option.
Signed-off-by: Andrew Melnychenko
---
meson.build | 6 ++
meson_options.txt | 1 +
src/qemu/meson.build | 1 +
src/qemu/qemu_interface.c | 42 +++
src/qemu/qemu_interface.h
Also, added logic for retrieving eBPF objects from QEMU.
eBPF objects stored in the hash table during runtime.
eBPF objects cached encoded in base64 in the .xml cache file.
Signed-off-by: Andrew Melnychenko
---
src/qemu/qemu_capabilities.c | 181 +++
src/qemu
This series of rfc patches adds support for loading the RSS eBPF program and
passing it to the QEMU.
Comments and suggestions would be useful.
QEMU with vhost may work with RSS through eBPF. To load eBPF,
the capabilities required that Libvirt may provide.
eBPF program and maps may be unique for
And added capability QEMU_CAPS_VIRTIO_RSS.
With "rss" and "rss_hash_report" from domain config,
qemu should enable "rss" and "hash" for virtio-net.
Added caps tests for qemu 5.2+.
Signed-off-by: Andrew Melnychenko
---
src/qemu/qemu_capabilities
Added rss, hash and rss+hash xml2argv tests.
virtio-options tests was used for xml2xml test.
Signed-off-by: Andrew Melnychenko
---
.../net-virtio-rss.x86_64-latest.args | 43 +++
tests/qemuxml2argvdata/net-virtio-rss.xml | 39 +
.../virtio
O
RSS.
Changes since v1:
* refactored patches
* changed docs and tests
Changes since RFC:
* rebased and refactored
* added tests
* postponed the helper
Andrew Melnychenko (4):
domain_conf: Added configs for RSS and Hash report.
qemu_capabilities: Added capabilites for qemu's &quo
Libvirt will create an NIC device command line with enabled "rss"/"hash".
If domain config contains "rss" and/or "rss_hash_report" options for driver.
Also if the qemu has device capabilities for RSS.
Signed-off-by: Andrew Melnychenko
---
sr
Added "rss" and "rss_hash_report" configuration that should be used with
qemu virtio RSS.
Both options are triswitches. Used as "driver" options and affects only NIC
with model type "virtio".
In other patches - options should turn on virtio-net RSS and
_hash_report" options for driver.
Libvirt will create an NIC device command line with enabled "rss"/"hash".
Signed-off-by: Andrew Melnychenko
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 2 ++
src/qemu/qemu_
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 xm
Added "rss" and "rss_hash_report" configuration that should be used with
qemu virtio RSS.
Both options are triswitches. Used as "driver" options and affects only NIC
with model type "virtio".
In other patches - options should turn on virtio-net RSS and
Added caps tests for qemu 5.2+.
Added rss, hash and rss+hash xml2argv tests.
virtio-options tests was used for xml2xml test.
Signed-off-by: Andrew Melnychenko
---
.../caps_5.1.0.x86_64.xml | 1 +
.../caps_5.2.0.aarch64.xml| 1 +
.../qemucapabilitiesdata
Added check for qemu virtio-net "ebpf_rss_fds" property.
This property allows to pass eBPF program/map file descriptors for RSS program.
In other patches, libvirt may launch qemu-ebpf-rss-helper and pass fds
to virtio-net qemu.
Signed-off-by: Andrew Melnychenko
---
src/qemu/qemu_capa
The helper called before NIC string creation. eBPF fds passed to the child
process through qmp.
Qemu should support "ebpf_rss_fds" and return path to the helper.
Also added check for device "update".
Signed-off-by: Andrew Melnychenko
---
src/qemu
property.
Signed-off-by: Andrew Melnychenko
---
src/qemu/qemu_command.c | 36 +++-
src/qemu/qemu_command.h | 2 ++
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 67a396a513..2fffcee609 100644
---
Similar to virSocketRecvFD() added virSocketRecvMultipleFDs().
This function returns multiple fds through unix socket.
New function is required for "qemu-ebpf-rss-helper" program.
The helper may pass few file descriptors - eBPF program and maps.
Signed-off-by: Andrew Melnychenko
Signed-off-by: Andrew Melnychenko
---
docs/formatdomain.rst | 16
1 file changed, 16 insertions(+)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 61ccd8895a..22ad19439f 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -5233,6 +5233,22
If domain config contains "rss" and/or "rss_hash_report" options for driver.
Also if the qemu has device capabilities for RSS. Libvirt will create an NIC
device
command line with enabled "rss"/"hash".
Signed-off-by: Andrew Melnychenko
---
src/qemu/qemu_c
Added qemu's property check for virtio-net.
And added capability QEMU_CAPS_VIRTIO_RSS.
With "rss" and "rss_hash_report" from domain config,
qemu should enable "rss" and "hash" for virtio-net.
Signed-off-by: Andrew Melnychenko
---
s
New function to call "qemu-ebpf-rss-helper".
The helper passes few fds through unix socket.
Technically libvirt should not be aware how many and what those fds.
The helper should return fds that should be passed to the qemu as is and in
same order.
Signed-off-by: Andrew Melnychenko
.
Qemu may use "in-qemu" RSS as a fallback option, which will not require system
permissions, but doesn't work with vhost TAP.
Qemu patches:
https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg03535.html
Andrew Melnychenko (10):
domain_conf: Added configs for RSS and
with "interface" for current qemu.
So, qemu returns where to find the helper through qmp, if the qemu supports
"ebpf_rss_fds".
Signed-off-by: Andrew Melnychenko
---
src/qemu/qemu_capabilities.c | 44 +++
src/qemu/qemu_capabilities.h | 3 +++
src/qe
hash properties.
Also "rss" may used to affect "ebpf_rss_fds" property of virtio-net in qemu.
Signed-off-by: Andrew Melnychenko
---
src/conf/domain_conf.c | 31 ++-
src/conf/domain_conf.h | 2 ++
2 files changed, 32 insertions(+), 1 deletion(-)
diff -
25 matches
Mail list logo