#ifndef _TFE_TAP_RSS_H_ #define _TFE_TAP_RSS_H_ #ifdef __cplusplus extern "C" { #endif #define TAP_RSS_LOG_TAG "TAP_RSS: " struct bpf_ctx; int tfe_tap_get_bpf_prog_fd(struct bpf_ctx *ctx); struct bpf_ctx *tfe_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 tfe_tap_global_unload_rss_bpf(struct bpf_ctx *ctx); struct tap_ctx *tfe_tap_ctx_create(void *ctx); struct tap_config *tfe_tap_config_create(const char *profile, int thread_num); void tfe_tap_destory(struct tap_config *tap); int tfe_tap_set_rps(void *local_logger, const char *tap_name, int thread_num, const char *rps_mask); int tfe_tap_open_per_thread(const char *tap_dev, int tap_flags, int bpf_prog_fd, void *logger); void tfe_tap_close_per_thread(int tap_fd); int tfe_tap_read_per_thread(int tap_fd, char *buff, int buff_size, void *logger); int tfe_tap_write_per_thread(int tap_fd, const char *data, int data_len, void *logger); #ifdef __cplusplus } #endif #endif