TSG-18200 Packet IO不再通过dir方向判断c2s/s2c
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "tfe_stream.h"
|
||||
#include "tfe_resource.h"
|
||||
|
||||
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 ret;
|
||||
uint16_t out_size;
|
||||
@@ -46,23 +46,29 @@ void tfe_set_intercept_metric(struct tfe_fieldstat_metric_t *fieldstat, struct t
|
||||
// incoming : E2I 的流量
|
||||
// outcoming : I2E 的流量
|
||||
// first_ctr_packet_dir <==> client hello packet dir
|
||||
if (dir_is_e2i == 1)
|
||||
// 1: E2I 0:I2E
|
||||
if (downstream_dir == 1)
|
||||
{
|
||||
in_pkts = downstream_rx_pkts;
|
||||
in_bytes = downstream_rx_bytes;
|
||||
|
||||
out_pkts = upstream_rx_pkts;
|
||||
out_bytes = upstream_rx_bytes;
|
||||
}
|
||||
else
|
||||
{
|
||||
in_pkts = upstream_rx_pkts;
|
||||
in_bytes = upstream_rx_bytes;
|
||||
|
||||
out_pkts = downstream_rx_pkts;
|
||||
out_bytes = downstream_rx_bytes;
|
||||
}
|
||||
|
||||
if (upstream_dir == 1)
|
||||
{
|
||||
in_pkts = upstream_rx_pkts;
|
||||
in_bytes = upstream_rx_bytes;
|
||||
}
|
||||
else
|
||||
{
|
||||
out_pkts = upstream_rx_pkts;
|
||||
out_bytes = upstream_rx_bytes;
|
||||
}
|
||||
|
||||
int nr_tags = 0;
|
||||
struct fieldstat_tag temp_tags[TAG_MAX] = {0};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user