diff options
| author | liuchang <[email protected]> | 2023-07-03 08:43:49 +0000 |
|---|---|---|
| committer | liuchang <[email protected]> | 2023-07-03 08:43:49 +0000 |
| commit | 96c628d2cda78c5952963d764b3f821951ff862c (patch) | |
| tree | 7ec928221fc9dce93626d071b83ba4392555b3d4 /shaping/include | |
| parent | 301613cec7f20aa45f4f56c958a38458a7f8f545 (diff) | |
check if the rule is enabled before get token, check interval default 120s
Diffstat (limited to 'shaping/include')
| -rw-r--r-- | shaping/include/shaper.h | 6 | ||||
| -rw-r--r-- | shaping/include/shaper_maat.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/shaping/include/shaper.h b/shaping/include/shaper.h index cc7c608..0cf3152 100644 --- a/shaping/include/shaper.h +++ b/shaping/include/shaper.h @@ -32,6 +32,7 @@ struct shaping_system_conf { int cpu_affinity_enable; int firewall_sid; unsigned long long cpu_affinity_mask; + int check_rule_enable_interval_sec; }; struct shaping_thread_ctx { @@ -46,9 +47,7 @@ struct shaping_thread_ctx { struct shaping_maat_info *maat_info; struct session_table *session_table; int session_need_reset; - unsigned int session_queue_len_max; - int polling_node_num_max[SHAPING_PRIORITY_NUM_MAX]; - int firewall_sid; + struct shaping_system_conf conf; }; struct shaping_ctx { @@ -141,6 +140,7 @@ struct shaping_flow { struct metadata ctrl_meta; unsigned long long processed_pkts; struct timespec stat_update_time; + time_t check_rule_time; }; struct shaper_flow_instance { diff --git a/shaping/include/shaper_maat.h b/shaping/include/shaper_maat.h index df3558f..51db653 100644 --- a/shaping/include/shaper_maat.h +++ b/shaping/include/shaper_maat.h @@ -32,6 +32,7 @@ void shaper_profile_ex_new(const char *table_name, int table_id, const char *key void shaper_profile_ex_dup(int table_id, void **to, void **from, long argl, void *argp); void shaper_profile_ex_free(int table_id, void **ad, long argl, void *argp); +int shaper_rule_is_enabled(struct shaping_thread_ctx *ctx, long long rule_id); void shaper_rules_update(struct shaping_thread_ctx *ctx, struct shaping_flow *sf, long long *rule_compile_ids, int rule_num); struct shaping_maat_info* shaper_maat_init(const char *instance_name); |
