[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 4/4] docs/devel/ebpf_rss.rst: Update for kernel RSS
From: |
Akihiko Odaki |
Subject: |
[RFC PATCH 4/4] docs/devel/ebpf_rss.rst: Update for kernel RSS |
Date: |
Sun, 8 Oct 2023 14:42:18 +0900 |
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 kernel RSS.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
docs/devel/ebpf_rss.rst | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/docs/devel/ebpf_rss.rst b/docs/devel/ebpf_rss.rst
index 4a68682b31..487123006c 100644
--- a/docs/devel/ebpf_rss.rst
+++ b/docs/devel/ebpf_rss.rst
@@ -5,9 +5,21 @@ 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. Kernel 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+. Kernel RSS requires Linux with the
following
+patches:
+https://lore.kernel.org/all/20231008052101.144422-1-akihiko.odaki@daynix.com/
+
+eBPF RSS does not support hash reporting. The hash types and indirection
+table size compatible with the kernel RSS may be limited by the kernel.
+
+virtio-net automatically chooses the RSS implementation to use. Kernel 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 +59,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 +74,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.42.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [RFC PATCH 4/4] docs/devel/ebpf_rss.rst: Update for kernel RSS,
Akihiko Odaki <=