28 lines
755 B
C
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 |