This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-kni/entry/include/kni_tap_rss.h
luwenpeng f7ea81dad8 TSG-10254 eBPF支持二元组分流
TSG-10527 eBPF支持四元组分流
TSG-10369 KNI多线程在TAP模式下支持eBPF分流
2022-05-31 17:38:42 +08:00

28 lines
755 B
C

#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