RFC ebpf: Added ebpf helper for libvirtd.
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 25 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | ebpf: Added eBPF initialization by fds.ebpf/ ebpf/ ebpf/ | +39 | 0 replies | |
| 2/5 | virtio-net: Added property to load eBPF RSS with fds.hw/ include/ | +74 | 0 replies | |
| 3/5 | ebpf_rss_helper: Added helper for eBPF RSS.ebpf/ meson.build | +138 | 0 replies | |
| 4/5 | qmp: Added qemu-ebpf-rss-path command.monitor/ qapi/ | +107 | 5 replies | |
| 5/5 | meson: libbpf dependency now exclusively for Linux.meson.build | +16 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.
Libvirt usually launches qemu with strict permissions. To enable eBPF RSS steering, qemu-ebpf-rss-helper was added.
Added property "ebpf_rss_fds" for "virtio-net" that allows to initialize eBPF RSS context with passed program & maps fds.
Added qemu-ebpf-rss-helper - simple helper that loads eBPF context and passes fds through unix socket. Libvirt should call the helper and pass fds to qemu through "ebpf_rss_fds" property.
Added explicit target OS check for libbpf dependency in meson. eBPF RSS works only with Linux TAP, so there is no reason to build eBPF loader/helper for non-Linux.
Overall, libvirt process should not be aware of the "interface" of eBPF RSS, it will not be aware of eBPF maps/program "type" and their quantity. That's why qemu and the helper should be from the same build and be "synchronized". Technically each qemu may have its own helper. That's why "query-helper-paths" qmp command was added. Qemu should return the path to the helper that suits and libvirt should use "that" helper for "that" emulator.
qmp sample:
C: { "execute": "query-helper-paths" }
S: { "return": [
{
"name": "qemu-ebpf-rss-helper",
"path": "/usr/local/libexec/qemu-ebpf-rss-helper"
}
]}
Andrew Melnychenko (5):
ebpf: Added eBPF initialization by fds.
virtio-net: Added property to load eBPF RSS with fds.
ebpf_rss_helper: Added helper for eBPF RSS.
qmp: Added qemu-ebpf-rss-path command.
meson: libbpf dependency now exclusively for Linux.
ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 31 +++++++- ebpf/ebpf_rss.h | 5 ++ ebpf/qemu-ebpf-rss-helper.c | 130 +++++++++++++++++++++++++++++++++ hw/net/virtio-net.c | 77 ++++++++++++++++++- include/hw/virtio/virtio-net.h | 1 + meson.build | 37 ++++++---- monitor/qmp-cmds.c | 78 ++++++++++++++++++++ qapi/misc.json | 29 ++++++++ 9 files changed, 374 insertions(+), 20 deletions(-) create mode 100644 ebpf/qemu-ebpf-rss-helper.c
Signature · 1 line
2.31.1