TSG-13626 tsg-service-chaining-engine发送Metrics
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "sce.h"
|
||||
#include "utils.h"
|
||||
#include "g_vxlan.h"
|
||||
#include "sf_metrics.h"
|
||||
#include "ctrl_packet.h"
|
||||
#include "global_metrics.h"
|
||||
|
||||
@@ -839,6 +840,7 @@ static enum raw_pkt_action handle_raw_packet(struct packet_io *handle, marsio_bu
|
||||
nsend = forward_packet_to_sf(handle, rx_buff, &meta, node, thread_seq, ctx);
|
||||
if (nsend > 0)
|
||||
{
|
||||
sf_metrics_inc(thread->sf_metrics, node->policy_id, node->sff_profile_id, node->sf_profile_id, 0, 0, 1, nsend);
|
||||
throughput_metrics_inc(&node->tx, 1, nsend);
|
||||
*action_bytes = nsend;
|
||||
return RAW_PKT_HIT_FORWARD;
|
||||
@@ -859,6 +861,7 @@ static enum raw_pkt_action handle_raw_packet(struct packet_io *handle, marsio_bu
|
||||
nsend = mirror_packet_to_sf(handle, rx_buff, &meta, node, thread_seq, ctx);
|
||||
if (nsend > 0)
|
||||
{
|
||||
sf_metrics_inc(thread->sf_metrics, node->policy_id, node->sff_profile_id, node->sf_profile_id, 0, 0, 1, nsend);
|
||||
throughput_metrics_inc(&node->tx, 1, nsend);
|
||||
throughput_metrics_inc(&g_metrics->mirroring_tx, 1, nsend);
|
||||
throughput_metrics_inc(&g_metrics->dev_endpoint_tx, 1, nsend);
|
||||
@@ -969,6 +972,7 @@ static enum inject_pkt_action handle_inject_packet(struct packet_io *handle, mar
|
||||
return INJT_PKT_MIRR_RX_DROP;
|
||||
}
|
||||
|
||||
sf_metrics_inc(thread->sf_metrics, chaining->chaining[sf_index].policy_id, chaining->chaining[sf_index].sff_profile_id, chaining->chaining[sf_index].sf_profile_id, 1, raw_len, 0, 0);
|
||||
throughput_metrics_inc(&chaining->chaining[sf_index].rx, 1, raw_len);
|
||||
|
||||
int next_sf_index;
|
||||
@@ -1016,6 +1020,7 @@ static enum inject_pkt_action handle_inject_packet(struct packet_io *handle, mar
|
||||
nsend = forward_packet_to_sf(handle, rx_buff, &meta, node, thread_seq, ctx);
|
||||
if (nsend > 0)
|
||||
{
|
||||
sf_metrics_inc(thread->sf_metrics, node->policy_id, node->sff_profile_id, node->sf_profile_id, 0, 0, 1, nsend);
|
||||
throughput_metrics_inc(&node->tx, 1, nsend);
|
||||
*action_bytes = nsend;
|
||||
return INJT_PKT_HIT_FWD2SF;
|
||||
@@ -1036,6 +1041,7 @@ static enum inject_pkt_action handle_inject_packet(struct packet_io *handle, mar
|
||||
nsend = mirror_packet_to_sf(handle, rx_buff, &meta, node, thread_seq, ctx);
|
||||
if (nsend > 0)
|
||||
{
|
||||
sf_metrics_inc(thread->sf_metrics, node->policy_id, node->sff_profile_id, node->sf_profile_id, 0, 0, 1, nsend);
|
||||
throughput_metrics_inc(&node->tx, 1, nsend);
|
||||
throughput_metrics_inc(&g_metrics->mirroring_tx, 1, nsend);
|
||||
throughput_metrics_inc(&g_metrics->dev_endpoint_tx, 1, nsend);
|
||||
|
||||
Reference in New Issue
Block a user