Packet IO支持单向流发送日志
This commit is contained in:
@@ -1514,6 +1514,7 @@ static int handle_raw_packet_from_nf(struct packet_io *handle, marsio_buff_t *rx
|
||||
struct packet_io *packet_io = thread->ref_io;
|
||||
struct packet_io_fs *packet_io_fs = thread->ret_fs_state;
|
||||
int is_ipv4 = 0;
|
||||
uint8_t flag = 0;
|
||||
char *header = NULL;
|
||||
int header_len = 0;
|
||||
void * logger = thread->logger;
|
||||
@@ -1548,6 +1549,12 @@ static int handle_raw_packet_from_nf(struct packet_io *handle, marsio_buff_t *rx
|
||||
throughput_metrics_inc(&s_ctx->c2s_info.rx, 1, raw_len);
|
||||
else
|
||||
throughput_metrics_inc(&s_ctx->s2c_info.rx, 1, raw_len);
|
||||
|
||||
flag = tfe_cmsg_get_flag(s_ctx->cmsg);
|
||||
if (flag & TFE_CMSG_FLAG_USER0) {
|
||||
send_event_log(s_ctx, thread_seq, ctx);
|
||||
tfe_cmsg_set_flag(s_ctx->cmsg, TFE_CMSG_FLAG_INIT);
|
||||
}
|
||||
marsio_send_burst(handle->dev_nf_interface.mr_path, thread_seq, &rx_buff, 1);
|
||||
return 0;
|
||||
}
|
||||
@@ -1640,7 +1647,7 @@ static int handle_raw_packet_from_nf(struct packet_io *handle, marsio_buff_t *rx
|
||||
throughput_metrics_inc(&packet_io_fs->tap_pkt_tx, 1, raw_len);
|
||||
}
|
||||
|
||||
uint8_t flag = tfe_cmsg_get_flag(s_ctx->cmsg);
|
||||
flag = tfe_cmsg_get_flag(s_ctx->cmsg);
|
||||
if (flag & TFE_CMSG_FLAG_USER0) {
|
||||
send_event_log(s_ctx, thread_seq, ctx);
|
||||
tfe_cmsg_set_flag(s_ctx->cmsg, TFE_CMSG_FLAG_INIT);
|
||||
|
||||
Reference in New Issue
Block a user