SCE增加raw & decrypted traffic的监控指标
This commit is contained in:
@@ -591,6 +591,15 @@ static inline int action_nf_inject(marsio_buff_t *rx_buff, struct metadata *meta
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (meta->is_decrypted)
|
||||
{
|
||||
THROUGHPUT_METRICS_INC(&(thread_metrics->dec_tx), 1, meta->raw_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
THROUGHPUT_METRICS_INC(&(thread_metrics->raw_tx), 1, meta->raw_len);
|
||||
}
|
||||
|
||||
marsio_send_burst(packet_io->dev_nf.mr_path, thread_index, &rx_buff, 1);
|
||||
THROUGHPUT_METRICS_INC(&(thread_metrics->nf_tx), 1, meta->raw_len);
|
||||
return meta->raw_len;
|
||||
@@ -1172,11 +1181,27 @@ static void handle_data_packet(marsio_buff_t *rx_buff, struct thread_ctx *thread
|
||||
goto error_bypass;
|
||||
}
|
||||
|
||||
if (meta.is_decrypted == 1)
|
||||
{
|
||||
THROUGHPUT_METRICS_INC(&(thread_metrics->dec_rx), 1, meta.raw_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
THROUGHPUT_METRICS_INC(&(thread_metrics->raw_rx), 1, meta.raw_len);
|
||||
}
|
||||
PACKET_TRACE_ON_POLICY(thread_ctx->ref_io->instance, rx_buff, &session_ctx->rule_ids, chaining);
|
||||
action_sf_chaining(thread_ctx, session_ctx, chaining, rx_buff, &meta, 0);
|
||||
return;
|
||||
|
||||
error_bypass:
|
||||
if (meta.is_decrypted == 1)
|
||||
{
|
||||
THROUGHPUT_METRICS_INC(&(thread_metrics->dec_rx), 1, meta.raw_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
THROUGHPUT_METRICS_INC(&(thread_metrics->raw_rx), 1, meta.raw_len);
|
||||
}
|
||||
action_err_bypass(rx_buff, &meta, NULL, thread_ctx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user