feature: TSG-21852 service_chaining_rule_hits support fieldstat4
This commit is contained in:
@@ -13,6 +13,7 @@ extern "C"
|
||||
#include "timestamp.h"
|
||||
#include "packet_io.h"
|
||||
#include "session_table.h"
|
||||
#include "sf_metrics.h"
|
||||
#include "global_metrics.h"
|
||||
|
||||
#define MAX_THREAD_NUM 256
|
||||
@@ -26,7 +27,6 @@ struct thread_ctx
|
||||
pthread_t tid;
|
||||
int thread_index;
|
||||
|
||||
struct sf_metrics *sf_metrics;
|
||||
struct session_table *session_table;
|
||||
|
||||
struct packet_io *ref_io;
|
||||
@@ -103,6 +103,7 @@ struct sce_ctx
|
||||
struct kafka *kfk;
|
||||
struct timestamp *ts;
|
||||
struct packet_io *io;
|
||||
struct sf_metrics *sf_metrics;
|
||||
struct global_metrics *metrics;
|
||||
struct policy_enforcer *enforcer;
|
||||
struct thread_ctx work_threads[MAX_THREAD_NUM];
|
||||
|
||||
@@ -7,6 +7,7 @@ extern "C"
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "kafka.h"
|
||||
|
||||
struct sf_metrics_key
|
||||
{
|
||||
@@ -16,12 +17,12 @@ struct sf_metrics_key
|
||||
uint32_t vsys_id;
|
||||
};
|
||||
|
||||
struct sf_metrics *sf_metrics_create(const char *profile);
|
||||
struct sf_metrics *sf_metrics_create(const char *profile, struct kafka *kfk);
|
||||
void sf_metrics_destory(struct sf_metrics *handle);
|
||||
void sf_metrics_reset(struct sf_metrics *handle);
|
||||
|
||||
void sf_metrics_inc(struct sf_metrics *handle, struct sf_metrics_key *key, uint64_t rx_pkts, uint64_t rx_bytes, uint64_t tx_pkts, uint64_t tx_bytes);
|
||||
void sf_metrics_send(struct sf_metrics *handle);
|
||||
void sf_metrics_reset(struct sf_metrics *handle, uint16_t thr_idx);
|
||||
void sf_metrics_input(struct sf_metrics *handle, uint16_t thr_idx, struct sf_metrics_key *key, uint64_t rx_pkts, uint64_t rx_bytes, uint64_t tx_pkts, uint64_t tx_bytes);
|
||||
void sf_metrics_output(struct sf_metrics *handle, uint16_t thr_idx);
|
||||
int sf_metrics_get_interval(struct sf_metrics *handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user