TSG-10254 eBPF支持二元组分流

TSG-10527 eBPF支持四元组分流
TSG-10369 KNI多线程在TAP模式下支持eBPF分流
This commit is contained in:
luwenpeng
2022-04-24 14:24:09 +08:00
parent 6d75cbe60b
commit f7ea81dad8
21 changed files with 1982 additions and 183 deletions

View File

@@ -0,0 +1,28 @@
#ifndef _KNI_TAP_RSS_H_
#define _KNI_TAP_RSS_H_
#ifdef __cplusplus
extern "C"
{
#endif
#define TAP_RSS_LOG_TAG "TAP_RSS :"
struct bpf_ctx;
int kni_tap_get_bpf_prog_fd(struct bpf_ctx *ctx);
struct bpf_ctx *kni_tap_global_load_rss_bpf(const char *bpf_obj_file, uint32_t bpf_queue_num, uint32_t bpf_hash_mode, uint32_t bpf_debug_log, void *logger);
void kni_tap_global_unload_rss_bpf(struct bpf_ctx *ctx);
int kni_tap_open_per_thread(const char *tap_dev, int tap_flags, int bpf_prog_fd, void *logger);
void kni_tap_close_per_thread(int tap_fd);
int kni_tap_read_per_thread(int tap_fd, char *buff, int buff_size, void *logger);
int kni_tap_write_per_thread(int tap_fd, const char *data, int data_len, void *logger);
#ifdef __cplusplus
}
#endif
#endif