[RFC PATCH 0/4] Added virtio-net RSS with eBPF support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 particular QEMU and
Libvirt retrieves eBPF through qapi.
For now, there is only "RSS" eBPF object in QEMU, in the future,
there may be another one(g.e. network filters).
That's why in Libvirt added logic to load and store any
eBPF object that QEMU provides using qapi schema.

For virtio-net RSS, the document has not changed.
```
 <interface type="network">
  <model type="virtio"/>
  <driver queues="4" rss="on" rss_hash_report="off"/>
 <interface type="network">
```

Simplified routine for RSS:
 * Libvirt retrieves eBPF "RSS" and load it.
 * Libvirt passes file descriptors to virtio-net with property "ebpf_rss_fds" ("rss" property should be "on" too).
 * if fds was provided - QEMU using eBPF RSS implementation.
 * if fds was not provided - QEMU tries to load eBPF RSS in own context and use it.
 * if eBPF RSS was not loaded - QEMU uses "in-qemu" RSS(vhost not supported).

 meson.build                  |   6 ++
 meson_options.txt            |   1 +
 src/qemu/meson.build         |   1 +
 src/qemu/qemu_capabilities.c | 181 +++++++++++++++++++++++++++++++++++
 src/qemu/qemu_capabilities.h |   4 +
 src/qemu/qemu_command.c      |  53 ++++++++++
 src/qemu/qemu_domain.c       |   4 +
 src/qemu/qemu_domain.h       |   3 +
 src/qemu/qemu_interface.c    |  42 ++++++++
 src/qemu/qemu_interface.h    |   4 +
 src/qemu/qemu_monitor.c      |  23 +++++
 src/qemu/qemu_monitor.h      |   3 +
 src/qemu/qemu_monitor_json.c |  21 ++++
 src/qemu/qemu_monitor_json.h |   3 +
 14 files changed, 349 insertions(+)

-- 
2.42.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux