TSG-13878 tsg-service-chaining-engine支持fieldstat2

This commit is contained in:
luwenpeng
2023-02-21 09:58:31 +08:00
parent b1abe96b06
commit 823490bcd1
20 changed files with 555 additions and 204 deletions

View File

@@ -6,42 +6,17 @@ extern "C"
{
#endif
#include "utils.h"
#include "policy.h"
#include "packet_io.h"
#include "session_table.h"
/******************************************************************************
* Struct For Global
******************************************************************************/
struct global_metrics
{
struct throughput_metrics dev_endpoint_rx; // 累计值
struct throughput_metrics dev_endpoint_tx; // 累计值
struct throughput_metrics dev_endpoint_err_drop; // 累计值
struct throughput_metrics dev_nf_interface_rx; // 累计值
struct throughput_metrics dev_nf_interface_tx; // 累计值
struct throughput_metrics dev_nf_interface_err_bypass; // 累计值
struct throughput_metrics hit_block_policy; // 累计值
struct throughput_metrics hit_bypass_policy; // 累计值
uint64_t session_nums; // 瞬时值
};
struct global_metrics *global_metrics_create();
void global_metrics_destory(struct global_metrics *metrics);
void global_metrics_dump(struct global_metrics *metrics);
/******************************************************************************
* Struct For Thread
******************************************************************************/
struct thread_ctx
{
pthread_t tid;
pthread_t tid;
int thread_index;
struct session_table *session_table;
@@ -77,7 +52,7 @@ struct session_ctx
struct sids raw_pkt_i2e_sids;
struct sids raw_pkt_e2i_sids;
// depending on first control packet
struct packet_info first_ctrl_pkt;
struct selected_chaining *chaining;