]> git.proxmox.com Git - mirror_qemu.git/blob - ebpf/ebpf_rss.h
include/exec: Move cpu_*()/cpu_env() to common header
[mirror_qemu.git] / ebpf / ebpf_rss.h
1 /*
2 * eBPF RSS header
3 *
4 * Developed by Daynix Computing LTD (http://www.daynix.com)
5 *
6 * Authors:
7 * Andrew Melnychenko <andrew@daynix.com>
8 * Yuri Benditovich <yuri.benditovich@daynix.com>
9 *
10 * This work is licensed under the terms of the GNU GPL, version 2. See
11 * the COPYING file in the top-level directory.
12 */
13
14 #ifndef QEMU_EBPF_RSS_H
15 #define QEMU_EBPF_RSS_H
16
17 struct EBPFRSSContext {
18 void *obj;
19 int program_fd;
20 int map_configuration;
21 int map_toeplitz_key;
22 int map_indirections_table;
23 };
24
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));
32
33 void ebpf_rss_init(struct EBPFRSSContext *ctx);
34
35 bool ebpf_rss_is_loaded(struct EBPFRSSContext *ctx);
36
37 bool ebpf_rss_load(struct EBPFRSSContext *ctx);
38
39 bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct EBPFRSSConfig *config,
40 uint16_t *indirections_table, uint8_t *toeplitz_key);
41
42 void ebpf_rss_unload(struct EBPFRSSContext *ctx);
43
44 #endif /* QEMU_EBPF_RSS_H */