TFE增加decrypted traffic mirror的监控指标

This commit is contained in:
luwenpeng
2024-03-07 16:17:36 +08:00
parent 4bde4e0abb
commit 0946effa1b
3 changed files with 80 additions and 3 deletions

View File

@@ -19,6 +19,28 @@ enum traffic_mirror_target_addr_type
TRAFFIC_MIRROR_TARGET_BY_ETHER_ADDR,
};
enum
{
TRAFFIC_MIRR_STAT_SUCC_BYTES,
TRAFFIC_MIRR_STAT_SUCC_PKTS,
TRAFFIC_MIRR_STAT_FAIL_BYTES,
TRAFFIC_MIRR_STAT_FAIL_PKTS,
TRAFFIC_MIRR_STAT_MAX,
};
struct traffic_mirror_stat
{
screen_stat_handle_t fs_handle;
uint64_t stat_idx[TRAFFIC_MIRR_STAT_MAX];
uint64_t stat_val[TRAFFIC_MIRR_STAT_MAX];
struct event_base *evbase;
struct event *ev;
};
struct traffic_mirror_instance
{
void * logger;
@@ -35,6 +57,7 @@ struct traffic_mirror_instance
char default_ether_addr_dst;
struct traffic_mirror_ethdev * ethdev;
struct traffic_mirror_stat *stat;
};
struct policy_table_ex_data
@@ -108,6 +131,7 @@ struct traffic_mirror_rebuild_target
int rewrite_as_target_vlan;
};
extern struct traffic_mirror_instance *g_traffic_mirror_instance;
struct traffic_mirror_ethdev * traffic_mirror_ethdev_pcap_create(const char * str_ethdev, void * logger);
struct traffic_mirror_ethdev * traffic_mirror_ethdev_mr4_create(const char * str_ethdev,
const char * str_app_name, unsigned int nr_threads, void * logger);