TSG-18200 Packet IO不再通过dir方向判断c2s/s2c

This commit is contained in:
wangmenglan
2024-01-03 13:14:38 +08:00
parent 058a5e6e66
commit dae38c5144
4 changed files with 57 additions and 120 deletions

View File

@@ -38,7 +38,7 @@ struct tfe_fieldstat_metric_t
struct fieldstat_dynamic_instance *instance;
};
void tfe_set_intercept_metric(struct tfe_fieldstat_metric_t *fieldstat, struct tfe_cmsg *cmsg, int hit_count, int downstream_rx_pkts, int downstream_rx_bytes, int upstream_rx_pkts, int upstream_rx_bytes, int thread_id, int dir_is_e2i);
void tfe_set_intercept_metric(struct tfe_fieldstat_metric_t *fieldstat, struct tfe_cmsg *cmsg, int hit_count, int downstream_rx_pkts, int downstream_rx_bytes, int downstream_dir, int upstream_rx_pkts, int upstream_rx_bytes, int upstream_dir, int thread_id);
int tfe_fieldstat_metric_incrby(struct tfe_fieldstat_metric_t *fieldstat, unsigned int column_id, long long value, const struct fieldstat_tag tags[], int n_tags, int thread_id);
struct tfe_fieldstat_metric_t *tfe_fieldstat_metric_create(char *telegraf_ip, int telegraf_port, char *app_name, int cycle, int max_thread, void *local_logger);
void tfe_fieldstat_metric_destroy(struct tfe_fieldstat_metric_t *fieldstat);

View File

@@ -44,13 +44,14 @@ struct packet_io_thread_ctx
struct packet_info
{
int is_e2i_dir;
struct tuple4 tuple4;
char *header_data;
int header_len;
int is_ipv4;
int is_e2i_dir;
int header_len;
char *header_data;
struct tuple4 tuple4;
struct sids sids;
struct route_ctx route_ctx;
struct throughput_metrics rx;
};
@@ -62,14 +63,9 @@ struct session_ctx
uint8_t protocol;
char session_addr[128];
char client_mac[6];
char server_mac[6];
struct packet_info c2s_info;
struct packet_info s2c_info;
struct metadata *raw_meta_i2e;
struct metadata *raw_meta_e2i;
struct metadata *ctrl_meta;
struct tfe_cmsg *cmsg;