PacketIO实时发送metrics统计
This commit is contained in:
@@ -1304,7 +1304,7 @@ static int handle_session_closing(struct metadata *meta, struct ctrl_pkt_parser
|
||||
{
|
||||
struct session_ctx *s_ctx = (struct session_ctx *)node->val_data;
|
||||
TFE_LOG_INFO(logger, "%s: session %lu closing", LOG_TAG_PKTIO, s_ctx->session_id);
|
||||
tfe_set_intercept_metric(acceptor_ctx->metric, s_ctx->cmsg, 1, s_ctx->c2s_info.rx.n_pkts, s_ctx->c2s_info.rx.n_bytes, s_ctx->c2s_info.is_e2i_dir, s_ctx->s2c_info.rx.n_pkts, s_ctx->s2c_info.rx.n_bytes, s_ctx->s2c_info.is_e2i_dir, thread_seq);
|
||||
tfe_set_intercept_metric(acceptor_ctx->metric, s_ctx, thread_seq, 1);
|
||||
session_table_delete_by_id(thread->session_table, meta->session_id);
|
||||
ATOMIC_DEC(&(packet_io_fs->session_num));
|
||||
return 0;
|
||||
@@ -1391,6 +1391,7 @@ static int handle_control_packet(struct packet_io *handle, marsio_buff_t *rx_buf
|
||||
static int handle_raw_packet_from_nf(struct packet_io *handle, marsio_buff_t *rx_buff, int thread_seq, void *ctx)
|
||||
{
|
||||
struct packet_io_thread_ctx *thread = (struct packet_io_thread_ctx *)ctx;
|
||||
struct acceptor_kni_v4 *acceptor_ctx = thread->ref_acceptor_ctx;
|
||||
struct packet_io *packet_io = thread->ref_io;
|
||||
struct packet_io_fs *packet_io_fs = thread->ret_fs_state;
|
||||
struct packet pkt;
|
||||
@@ -1465,6 +1466,7 @@ static int handle_raw_packet_from_nf(struct packet_io *handle, marsio_buff_t *rx
|
||||
throughput_metrics_inc(&s_ctx->s2c_info.rx, 1, raw_len);
|
||||
}
|
||||
|
||||
tfe_set_intercept_metric(acceptor_ctx->metric, s_ctx, thread_seq, 0);
|
||||
flag = tfe_cmsg_get_flag(s_ctx->cmsg);
|
||||
if (flag & TFE_CMSG_FLAG_USER0) {
|
||||
send_event_log(s_ctx, thread_seq, ctx);
|
||||
@@ -1517,6 +1519,7 @@ static int handle_raw_packet_from_nf(struct packet_io *handle, marsio_buff_t *rx
|
||||
is_ipv4 = s_ctx->s2c_info.is_ipv4;
|
||||
throughput_metrics_inc(&s_ctx->s2c_info.rx, 1, raw_len);
|
||||
}
|
||||
tfe_set_intercept_metric(acceptor_ctx->metric, s_ctx, thread_seq, 0);
|
||||
|
||||
if (header != NULL) {
|
||||
char *packet_buff = NULL;
|
||||
|
||||
Reference in New Issue
Block a user