From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: qemu-devel@nongnu.org,
Yuri Benditovich <yuri.benditovich@daynix.com>,
Andrew Melnychenko <andrew@daynix.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Subject: [PATCH RFC v3 11/11] docs/devel/ebpf_rss.rst: Update for peer RSS
Date: Sun, 15 Sep 2024 10:23:52 +0900 [thread overview]
Message-ID: <20240915-hash-v3-11-79cb08d28647@daynix.com> (raw)
In-Reply-To: <20240915-hash-v3-0-79cb08d28647@daynix.com>
eBPF RSS virtio-net support was written in assumption that there is only
one alternative RSS implementation: 'in-qemu' RSS. It is no longer true,
and we now have yet another implementation; namely the peer RSS.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
| 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
--git a/docs/devel/ebpf_rss.rst b/docs/devel/ebpf_rss.rst
index 4a68682b31ac..06b09e8a3fed 100644
--- a/docs/devel/ebpf_rss.rst
+++ b/docs/devel/ebpf_rss.rst
@@ -5,9 +5,22 @@ eBPF RSS virtio-net support
RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues
by calculating packet hash. Usually every queue is processed then by a specific guest CPU core.
-For now there are 2 RSS implementations in qemu:
-- 'in-qemu' RSS (functions if qemu receives network packets, i.e. vhost=off)
-- eBPF RSS (can function with also with vhost=on)
+For now there are 3 RSS implementations in qemu:
+1. Peer RSS
+2. eBPF RSS
+3. 'In-QEMU' RSS
+
+'In-QEMU' RSS is incompatible with vhost since the packets are not routed to
+QEMU. eBPF RSS requires Linux 5.8+. Peer RSS requires the peer to implement RSS.
+Currently QEMU can use the RSS implementation of vDPA and Linux's TUN module
+with the following patch applied:
+https://lore.kernel.org/r/20240915-rss-v3-0-c630015db082@daynix.com/
+
+eBPF RSS does not support hash reporting. Peer RSS may support limited hash
+types.
+
+virtio-net automatically chooses the RSS implementation to use. Peer RSS is
+the most preferred, and 'in-QEMU' RSS is the least.
eBPF support (CONFIG_EBPF) is enabled by 'configure' script.
To enable eBPF RSS support use './configure --enable-bpf'.
@@ -47,9 +60,6 @@ eBPF RSS turned on by different combinations of vhost-net, vitrio-net and tap co
tap,vhost=on & virtio-net-pci,rss=on,hash=on
-If CONFIG_EBPF is not set then only 'in-qemu' RSS is supported.
-Also 'in-qemu' RSS, as a fallback, is used if the eBPF program failed to load or set to TUN.
-
RSS eBPF program
----------------
@@ -65,7 +75,6 @@ Prerequisites to recompile the eBPF program (regenerate ebpf/rss.bpf.skeleton.h)
$ make -f Makefile.ebpf
Current eBPF RSS implementation uses 'bounded loops' with 'backward jump instructions' which present in the last kernels.
-Overall eBPF RSS works on kernels 5.8+.
eBPF RSS implementation
-----------------------
--
2.46.0
prev parent reply other threads:[~2024-09-15 1:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-15 1:23 [PATCH RFC v3 00/11] virtio-net: Offload hashing without eBPF Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 01/11] qdev-properties: DEFINE_PROP_ON_OFF_AUTO_BIT() Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 02/11] net/vhost-vdpa: Report hashing capability Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 03/11] virtio-net: Move virtio_net_get_features() down Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 04/11] virtio-net: Retrieve peer hashing capability Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 05/11] net/vhost-vdpa: Remove dummy SetSteeringEBPF Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 06/11] virtio-net: Add hash type options Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 07/11] net: Allow configuring virtio hashing Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 08/11] virtio-net: Use qemu_set_vnet_hash() Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 09/11] virtio-net: Offload hashing without vhost Akihiko Odaki
2024-09-15 1:23 ` [PATCH RFC v3 10/11] tap: Report virtio-net hashing support on Linux Akihiko Odaki
2024-09-15 1:23 ` Akihiko Odaki [this message]
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=20240915-hash-v3-11-79cb08d28647@daynix.com \
--to=akihiko.odaki@daynix.com \
--cc=andrew@daynix.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).