Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / ebpf / ebpf_rss.h
blobbf3f2572c7c97cae3132b10c256651692eff72a2
1 /*
2 * eBPF RSS header
4 * Developed by Daynix Computing LTD (http://www.daynix.com)
6 * Authors:
7 * Andrew Melnychenko <andrew@daynix.com>
8 * Yuri Benditovich <yuri.benditovich@daynix.com>
10 * This work is licensed under the terms of the GNU GPL, version 2. See
11 * the COPYING file in the top-level directory.
14 #ifndef QEMU_EBPF_RSS_H
15 #define QEMU_EBPF_RSS_H
17 struct EBPFRSSContext {
18 void *obj;
19 int program_fd;
20 int map_configuration;
21 int map_toeplitz_key;
22 int map_indirections_table;
25 struct EBPFRSSConfig {
26 uint8_t redirect;
27 uint8_t populate_hash;
28 uint32_t hash_types;
29 uint16_t indirections_len;
30 uint16_t default_queue;
31 } __attribute__((packed));
33 void ebpf_rss_init(struct EBPFRSSContext *ctx);
35 bool ebpf_rss_is_loaded(struct EBPFRSSContext *ctx);
37 bool ebpf_rss_load(struct EBPFRSSContext *ctx);
39 bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct EBPFRSSConfig *config,
40 uint16_t *indirections_table, uint8_t *toeplitz_key);
42 void ebpf_rss_unload(struct EBPFRSSContext *ctx);
44 #endif /* QEMU_EBPF_RSS_H */