aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-06-04 13:38:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-06-04 13:38:49 +0100
commit1cbd2d914939ee6028e9688d4ba859a528c28405 (patch)
tree6255cafeb0a6079ccfa1f2aced089f90e6d5f3e1 /include
parent5a95f5ce3cd5842cc8f61a91ecd4fb4e8d10104f (diff)
parent90322e646e87c1440661cb3ddbc0cc94309d8a4f (diff)
downloadqemu-1cbd2d914939ee6028e9688d4ba859a528c28405.zip
qemu-1cbd2d914939ee6028e9688d4ba859a528c28405.tar.gz
qemu-1cbd2d914939ee6028e9688d4ba859a528c28405.tar.bz2
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Fri 04 Jun 2021 08:26:16 BST # gpg: using RSA key EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: MAINTAINERS: Added eBPF maintainers information. docs: Added eBPF documentation. virtio-net: Added eBPF RSS to virtio-net. ebpf: Added eBPF RSS loader. ebpf: Added eBPF RSS program. net: Added SetSteeringEBPF method for NetClientState. net/tap: Added TUNSETSTEERINGEBPF code. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-net.h4
-rw-r--r--include/net/net.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index 7e96d19..824a69c 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -21,6 +21,8 @@
#include "qemu/option_int.h"
#include "qom/object.h"
+#include "ebpf/ebpf_rss.h"
+
#define TYPE_VIRTIO_NET "virtio-net-device"
OBJECT_DECLARE_SIMPLE_TYPE(VirtIONet, VIRTIO_NET)
@@ -130,6 +132,7 @@ typedef struct VirtioNetRscChain {
typedef struct VirtioNetRssData {
bool enabled;
+ bool enabled_software_rss;
bool redirect;
bool populate_hash;
uint32_t hash_types;
@@ -209,6 +212,7 @@ struct VirtIONet {
Notifier migration_state;
VirtioNetRssData rss_data;
struct NetRxPkt *rx_pkt;
+ struct EBPFRSSContext ebpf_rss;
};
void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
diff --git a/include/net/net.h b/include/net/net.h
index 1ef536d..5d15080 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -61,6 +61,7 @@ typedef int (SetVnetBE)(NetClientState *, bool);
typedef struct SocketReadState SocketReadState;
typedef void (SocketReadStateFinalize)(SocketReadState *rs);
typedef void (NetAnnounce)(NetClientState *);
+typedef bool (SetSteeringEBPF)(NetClientState *, int);
typedef struct NetClientInfo {
NetClientDriver type;
@@ -82,6 +83,7 @@ typedef struct NetClientInfo {
SetVnetLE *set_vnet_le;
SetVnetBE *set_vnet_be;
NetAnnounce *announce;
+ SetSteeringEBPF *set_steering_ebpf;
} NetClientInfo;
struct NetClientState {