[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231008052101.144422-1-akihiko.odaki@daynix.com>
Date: Sun, 8 Oct 2023 14:20:44 +0900
From: Akihiko Odaki <akihiko.odaki@...nix.com>
To:
Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Jason Wang <jasowang@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Xuan Zhuo Shuah Khan <"xuanzhuo@...ux.alibaba.comshuah"@kernel.org>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
linux-kselftest@...r.kernel.org, bpf@...r.kernel.org,
davem@...emloft.net, kuba@...nel.org, ast@...nel.org,
daniel@...earbox.net, andrii@...nel.org, kafai@...com,
songliubraving@...com, yhs@...com, john.fastabend@...il.com,
kpsingh@...nel.org, rdunlap@...radead.org, willemb@...gle.com,
gustavoars@...nel.org, herbert@...dor.apana.org.au,
steffen.klassert@...unet.com, nogikh@...gle.com, pablo@...filter.org,
decui@...rosoft.com, cai@....pw, jakub@...udflare.com,
elver@...gle.com, pabeni@...hat.com,
Yuri Benditovich <yuri.benditovich@...nix.com>,
Akihiko Odaki <akihiko.odaki@...nix.com>
Subject: [RFC PATCH 0/7] tun: Introduce virtio-net hashing feature
virtio-net have two usage of hashes: one is RSS and another is hash
reporting. Conventionally the hash calculation was done by the VMM.
However, computing the hash after the queue was chosen defeats the
purpose of RSS.
Another approach is to use eBPF steering program. This approach has
another downside: it cannot report the calculated hash due to the
restrictive nature of eBPF.
Introduce the code to compute hashes to the kernel in order to overcome
thse challenges.
An alternative solution is to extend the eBPF steering program so that it
will be able to report to the userspace, but it makes little sense to
allow to implement different hashing algorithms with eBPF since the hash
value reported by virtio-net is strictly defined by the specification.
An implementation of this alternative solution was submitted as RFC
patches in the past:
https://lore.kernel.org/lkml/20210112194143.1494-1-yuri.benditovich@daynix.com/
QEMU patched to use this new feature is available at:
https://github.com/daynix/qemu/tree/akihikodaki/rss
The QEMU patches will soon be submitted to the upstream as RFC too.
Akihiko Odaki (7):
net: skbuff: Add tun_vnet_hash flag
net/core: Ensure qdisc_skb_cb will not be overwritten
net: sched: Add members to qdisc_skb_cb
virtio_net: Add functions for hashing
tun: Introduce virtio-net hashing feature
selftest: tun: Add tests for virtio-net hashing
vhost_net: Support VIRTIO_NET_F_HASH_REPORT
drivers/net/tun.c | 187 ++++++++-
drivers/vhost/net.c | 16 +-
include/linux/skbuff.h | 2 +
include/linux/virtio_net.h | 157 ++++++++
include/net/sch_generic.h | 12 +-
include/uapi/linux/if_tun.h | 16 +
net/core/dev.c | 1 +
tools/testing/selftests/net/Makefile | 2 +-
tools/testing/selftests/net/tun.c | 578 ++++++++++++++++++++++++++-
9 files changed, 933 insertions(+), 38 deletions(-)
--
2.42.0
Powered by blists - more mailing lists