OSDN Git Service

virtio-net: Added eBPF RSS to virtio-net.
authorAndrew Melnychenko <andrew@daynix.com>
Fri, 14 May 2021 11:48:33 +0000 (14:48 +0300)
committerJason Wang <jasowang@redhat.com>
Fri, 4 Jun 2021 07:25:46 +0000 (15:25 +0800)
commit0145c3934895e2cb2b8bd679ca274bc5f7e76de7
tree8a09cf572d7634ac3e70250684b8a7cfaa5565ba
parent46627f41b6b781885c64a2b12814060a7ca8da36
virtio-net: Added eBPF RSS to virtio-net.

When RSS is enabled the device tries to load the eBPF program
to select RX virtqueue in the TUN. If eBPF can be loaded
the RSS will function also with vhost (works with kernel 5.8 and later).
Software RSS is used as a fallback with vhost=off when eBPF can't be loaded
or when hash population requested by the guest.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/vhost_net.c
hw/net/virtio-net.c
include/hw/virtio/virtio-net.h
net/vhost-vdpa.c