All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Melnychenko <andrew@daynix.com>
To: jasowang@redhat.com, mst@redhat.com, pbonzini@redhat.com,
	marcandre.lureau@redhat.com, berrange@redhat.com,
	thuth@redhat.com, philmd@linaro.org, armbru@redhat.com,
	eblake@redhat.com, qemu-devel@nongnu.org, toke@redhat.com,
	mprivozn@redhat.com
Cc: yuri.benditovich@daynix.com, yan@daynix.com
Subject: [PATCH 0/5] eBPF RSS Helper support.
Date: Sun, 19 Feb 2023 18:20:55 +0200	[thread overview]
Message-ID: <20230219162100.174318-1-andrew@daynix.com> (raw)

This series of patches provides the ability to initialize eBPF RSS steering
with the helper.
Now, virtio-net devices can accept eBPF programs and maps through properties
as external file descriptors. Access to the eBPF map is direct through mmap()
call, so it should not require additional capabilities to bpf* calls.
eBPF file descriptors can be passed to QEMU from parent process or by unix
socket with sendfd() qmp command.
The helper is provided that would load eBPF RSS program/maps and pass fd to
the called process(in future - Libvirtd) through unix socket.
Because of structures stored in the maps, it's crucial that the helper provides a proper eBPF program. That's why the stamp was added to the helper and
QEMU may check the binary. Also, additional qmp command was added for checking
the stamp.
Overall, the basic scenario of using the helper looks like this:
 * Libvirt checks for ebpf_fds property.
 * Libvirt ask QEMU for the proper helper(where is located and proper stamp)
 * Libvirt calls the helper with BPF capabilities and retrieves fds.
 * Libvirt launches the QEMU with eBPF fds passed.

Changes since RFC:
 * refactored/rebased code.
 * changed qmp command.
 * refactored helper.
 
Andrew Melnychenko (5):
  ebpf: Added eBPF initialization by fds and map update.
  virtio-net: Added property to load eBPF RSS with fds.
  qmp: Added the helper stamp check.
  ebpf_rss_helper: Added helper for eBPF RSS.
  qmp: Added find-ebpf-rss-helper command.

 ebpf/ebpf_rss-stub.c                       |   6 +
 ebpf/ebpf_rss.c                            | 120 ++++++--
 ebpf/ebpf_rss.h                            |  10 +
 ebpf/qemu-ebpf-rss-helper.c                | 132 +++++++++
 hw/net/virtio-net.c                        |  77 ++++-
 include/hw/virtio/virtio-net.h             |   1 +
 meson.build                                |  47 ++-
 monitor/meson.build                        |   1 +
 monitor/qemu-ebpf-rss-helper-stamp-utils.c | 322 +++++++++++++++++++++
 monitor/qemu-ebpf-rss-helper-stamp-utils.h |  39 +++
 monitor/qmp-cmds.c                         |  28 ++
 qapi/misc.json                             |  42 +++
 12 files changed, 785 insertions(+), 40 deletions(-)
 create mode 100644 ebpf/qemu-ebpf-rss-helper.c
 create mode 100644 monitor/qemu-ebpf-rss-helper-stamp-utils.c
 create mode 100644 monitor/qemu-ebpf-rss-helper-stamp-utils.h

-- 
2.39.1



             reply	other threads:[~2023-02-19 16:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 16:20 Andrew Melnychenko [this message]
2023-02-19 16:20 ` [PATCH 1/5] ebpf: Added eBPF initialization by fds and map update Andrew Melnychenko
2023-02-19 16:20 ` [PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds Andrew Melnychenko
2023-02-19 16:20 ` [PATCH 3/5] qmp: Added the helper stamp check Andrew Melnychenko
2023-02-20  9:49   ` Daniel P. Berrangé
2023-02-27  3:45     ` Andrew Melnichenko
2023-02-27 14:06       ` Toke Høiland-Jørgensen
2023-02-28  9:56     ` Yuri Benditovich
2023-02-28 18:04       ` Daniel P. Berrangé
2023-02-28 19:01         ` Toke Høiland-Jørgensen
2023-02-28 19:03           ` Daniel P. Berrangé
2023-02-28 22:21             ` Toke Høiland-Jørgensen
2023-03-01  9:30               ` Daniel P. Berrangé
2023-03-01 14:53                 ` Toke Høiland-Jørgensen
2023-03-01 15:05                   ` Daniel P. Berrangé
2023-03-01 22:40                     ` Toke Høiland-Jørgensen
2023-03-22 13:26                       ` Andrew Melnichenko
2023-03-22 15:59                         ` Daniel P. Berrangé
2023-02-28 19:01         ` Daniel P. Berrangé
2023-03-01  6:49         ` Yuri Benditovich
2023-03-01  9:31           ` Daniel P. Berrangé
2023-02-19 16:20 ` [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS Andrew Melnychenko
2023-02-20  9:54   ` Daniel P. Berrangé
2023-02-27  3:50     ` Andrew Melnichenko
2023-02-19 16:21 ` [PATCH 5/5] qmp: Added find-ebpf-rss-helper command Andrew Melnychenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230219162100.174318-1-andrew@daynix.com \
    --to=andrew@daynix.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mprivozn@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=toke@redhat.com \
    --cc=yan@daynix.com \
    --cc=yuri.benditovich@daynix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.