feature: TSG-21852 service_chaining_rule_hits support fieldstat4
This commit is contained in:
@@ -649,6 +649,7 @@ static inline void action_mirr_forward(struct session_ctx *session_ctx, marsio_b
|
||||
{
|
||||
struct thread_metrics *thread_metrics = &thread_ctx->thread_metrics;
|
||||
struct packet_io *packet_io = thread_ctx->ref_io;
|
||||
struct sf_metrics *sf_metrics = thread_ctx->ref_sce_ctx->sf_metrics;
|
||||
int thread_index = thread_ctx->thread_index;
|
||||
|
||||
char *raw_data = marsio_buff_mtod(rx_buff);
|
||||
@@ -671,7 +672,7 @@ static inline void action_mirr_forward(struct session_ctx *session_ctx, marsio_b
|
||||
key.sff_profile_id = sf->sff_profile_id;
|
||||
key.sf_profile_id = sf->sf_profile_id;
|
||||
key.vsys_id = sf->rule_vsys_id;
|
||||
sf_metrics_inc(thread_ctx->sf_metrics, &key, 0, 0, 1, nsend);
|
||||
sf_metrics_input(sf_metrics, thread_index, &key, 0, 0, 1, nsend);
|
||||
}
|
||||
|
||||
static inline void action_stee_bypass(marsio_buff_t *rx_buff, struct metadata *meta, struct selected_sf *sf, struct thread_ctx *thread_ctx)
|
||||
@@ -695,6 +696,8 @@ static inline void action_stee_block(marsio_buff_t *rx_buff, struct metadata *me
|
||||
static inline void action_stee_forward(struct session_ctx *session_ctx, marsio_buff_t *rx_buff, struct metadata *meta, struct selected_sf *sf, struct thread_ctx *thread_ctx)
|
||||
{
|
||||
struct thread_metrics *thread_metrics = &thread_ctx->thread_metrics;
|
||||
struct sf_metrics *sf_metrics = thread_ctx->ref_sce_ctx->sf_metrics;
|
||||
int thread_index = thread_ctx->thread_index;
|
||||
|
||||
int nsend = send_packet_to_sf(session_ctx, rx_buff, meta, sf, thread_ctx);
|
||||
THROUGHPUT_METRICS_INC(&(thread_metrics->stee_tx), 1, meta->raw_len);
|
||||
@@ -704,7 +707,7 @@ static inline void action_stee_forward(struct session_ctx *session_ctx, marsio_b
|
||||
key.sff_profile_id = sf->sff_profile_id;
|
||||
key.sf_profile_id = sf->sf_profile_id;
|
||||
key.vsys_id = sf->rule_vsys_id;
|
||||
sf_metrics_inc(thread_ctx->sf_metrics, &key, 0, 0, 1, nsend);
|
||||
sf_metrics_input(sf_metrics, thread_index, &key, 0, 0, 1, nsend);
|
||||
}
|
||||
|
||||
static void action_sf_chaining(struct thread_ctx *thread_ctx, struct session_ctx *session_ctx, struct selected_chaining *chaining, marsio_buff_t *rx_buff, struct metadata *meta, int next_sf_index)
|
||||
@@ -1234,6 +1237,7 @@ static void handle_inject_vxlan_packet(marsio_buff_t *rx_buff, struct thread_ctx
|
||||
struct packet_io *packet_io = thread_ctx->ref_io;
|
||||
int thread_index = thread_ctx->thread_index;
|
||||
struct sce_ctx *sce_ctx = thread_ctx->ref_sce_ctx;
|
||||
struct sf_metrics *sf_metrics = sce_ctx->sf_metrics;
|
||||
|
||||
struct metadata meta;
|
||||
struct vxlan_hdr *vxlan_hdr = NULL;
|
||||
@@ -1311,7 +1315,7 @@ static void handle_inject_vxlan_packet(marsio_buff_t *rx_buff, struct thread_ctx
|
||||
key.sff_profile_id = sf->sff_profile_id;
|
||||
key.sf_profile_id = sf->sf_profile_id;
|
||||
key.vsys_id = sf->rule_vsys_id;
|
||||
sf_metrics_inc(thread_ctx->sf_metrics, &key, 1, raw_len, 0, 0);
|
||||
sf_metrics_input(sf_metrics, thread_index, &key, 1, raw_len, 0, 0);
|
||||
}
|
||||
|
||||
marsio_buff_adj(rx_buff, raw_len - meta.raw_len);
|
||||
|
||||
Reference in New Issue
Block a user