TSG-13837 支持decrypted traffic steering/mirroring,并重构packet_io
This commit is contained in:
@@ -9,7 +9,7 @@ extern "C"
|
||||
#include "utils.h"
|
||||
#include <MESA/field_stat2.h>
|
||||
|
||||
struct global_metrics_config
|
||||
struct metrics_config
|
||||
{
|
||||
char output_file[256];
|
||||
char statsd_server[32];
|
||||
@@ -21,42 +21,78 @@ struct global_metrics_config
|
||||
char prometheus_listen_url[256];
|
||||
};
|
||||
|
||||
struct device_metrics
|
||||
{
|
||||
struct throughput_metrics nf_rx; // 累计值
|
||||
struct throughput_metrics nf_tx; // 累计值
|
||||
|
||||
struct throughput_metrics endpoint_rx; // 累计值
|
||||
struct throughput_metrics endpoint_tx; // 累计值
|
||||
struct throughput_metrics endpoint_drop; // 累计值
|
||||
};
|
||||
|
||||
// raw_pkt_metrics 不包含 g_vxlan 所占的字节
|
||||
struct raw_pkt_metrics
|
||||
{
|
||||
struct throughput_metrics mirr_bypass; // 累计值
|
||||
struct throughput_metrics mirr_block; // 累计值
|
||||
struct throughput_metrics mirr_rx_drop; // 累计值
|
||||
struct throughput_metrics mirr_tx; // 累计值
|
||||
|
||||
struct throughput_metrics stee_bypass; // 累计值
|
||||
struct throughput_metrics stee_block; // 累计值
|
||||
struct throughput_metrics stee_rx; // 累计值
|
||||
struct throughput_metrics stee_tx; // 累计值
|
||||
|
||||
struct throughput_metrics miss_sess; // 累计值
|
||||
struct throughput_metrics error_bypass; // 累计值
|
||||
struct throughput_metrics error_block; // 累计值
|
||||
};
|
||||
|
||||
struct ctrl_pkt_metrics
|
||||
{
|
||||
struct throughput_metrics rx; // 累计值
|
||||
struct throughput_metrics tx; // 累计值
|
||||
|
||||
uint64_t opening; // 累计值
|
||||
uint64_t active; // 累计值
|
||||
uint64_t closing; // 累计值
|
||||
uint64_t resetall; // 累计值
|
||||
uint64_t error; // 累计值
|
||||
};
|
||||
|
||||
struct keepalived_pkt_metrics
|
||||
{
|
||||
struct throughput_metrics downlink_rx; // 累计值
|
||||
struct throughput_metrics downlink_tx; // 累计值
|
||||
|
||||
struct throughput_metrics uplink_rx; // 累计值
|
||||
struct throughput_metrics uplink_tx_drop; // 累计值
|
||||
};
|
||||
|
||||
struct sf_status_metrics
|
||||
{
|
||||
uint64_t active; // 累计值
|
||||
uint64_t inactive; // 累计值
|
||||
};
|
||||
|
||||
struct sf_session_metrics
|
||||
{
|
||||
uint64_t num; // 当前值
|
||||
uint64_t log; // 累计值
|
||||
};
|
||||
|
||||
struct global_metrics
|
||||
{
|
||||
struct throughput_metrics dev_endpoint_rx; // 累计值
|
||||
struct throughput_metrics dev_endpoint_tx; // 累计值
|
||||
struct throughput_metrics dev_endpoint_err_drop; // 累计值
|
||||
struct device_metrics device;
|
||||
struct raw_pkt_metrics raw_pkt;
|
||||
struct ctrl_pkt_metrics ctrl_pkt;
|
||||
struct keepalived_pkt_metrics kee_pkt;
|
||||
|
||||
struct throughput_metrics raw_pkt_rx; // 累计值
|
||||
struct throughput_metrics raw_pkt_tx; // 累计值
|
||||
struct throughput_metrics raw_pkt_err_bypass; // 累计值
|
||||
struct sf_status_metrics sf_status;
|
||||
struct sf_session_metrics sf_session;
|
||||
|
||||
struct throughput_metrics hit_block_policy; // 累计值
|
||||
struct throughput_metrics hit_bypass_policy; // 累计值
|
||||
|
||||
struct throughput_metrics steering_tx; // 累计值
|
||||
struct throughput_metrics steering_rx; // 累计值
|
||||
|
||||
struct throughput_metrics mirroring_tx; // 累计值
|
||||
struct throughput_metrics mirroring_rx_drop; // 累计值
|
||||
|
||||
struct throughput_metrics downlink_keepalive_pkt_rx; // 累计值
|
||||
struct throughput_metrics uplink_keepalive_pkt_rx; // 累计值
|
||||
struct throughput_metrics ctrl_pkt_rx; // 累计值
|
||||
|
||||
uint64_t ctrl_pkt_opening_num; // 累计值
|
||||
uint64_t ctrl_pkt_active_num; // 累计值
|
||||
uint64_t ctrl_pkt_closing_num; // 累计值
|
||||
uint64_t ctrl_pkt_resetall_num; // 累计值
|
||||
uint64_t ctrl_pkt_error_num; // 累计值
|
||||
|
||||
uint64_t sf_active_times; // 累计值
|
||||
uint64_t sf_inactive_times; // 累计值
|
||||
|
||||
uint64_t session_nums; // 瞬时值
|
||||
uint64_t send_log; // 瞬时值
|
||||
|
||||
struct global_metrics_config config;
|
||||
struct metrics_config config;
|
||||
screen_stat_handle_t fs_handle;
|
||||
int fs_id[128];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user