reactor packet I/O & duplicated packet filter & evicted session filter

This commit is contained in:
luwenpeng
2024-03-09 19:28:14 +08:00
parent ee35a26a9d
commit 512dfddd03
79 changed files with 1974 additions and 2093 deletions

View File

@@ -55,13 +55,18 @@ struct packet_io_options
struct packet_io;
struct packet_io *packet_io_new(struct packet_io_options *opts);
void packet_io_free(struct packet_io *handle);
void packet_io_print_stat(struct packet_io *handle);
struct packet_io_stat *packet_io_get_stat(struct packet_io *handle);
// return 0 if success, -1 if failed
// TODO performance optimization egress for multi-packet
// return 0: success
// return -1: failed
int packet_io_init(struct packet_io *handle, uint16_t thread_id);
// return number of packets received
int packet_io_ingress(struct packet_io *handle, uint16_t thread_id, struct packet *pkts, int nr_pkts);
void packet_io_egress(struct packet_io *handle, uint16_t thread_id, struct packet *pkts, int nr_pkts);
void packet_io_drop(struct packet_io *handle, uint16_t thread_id, struct packet *pkts, int nr_pkts);
void packet_io_inject(struct packet_io *handle, uint16_t thread_id, struct packet *pkts, int nr_pkts);
#ifdef __cpluscplus
}