summaryrefslogtreecommitdiff
path: root/shaping/include
diff options
context:
space:
mode:
authorroot <[email protected]>2024-01-22 08:08:30 +0000
committerroot <[email protected]>2024-01-22 08:08:30 +0000
commit4bc81cc24f2989b84670c54252585c5403acbc01 (patch)
treef975da4d76e1ecbaa1415c21a7d348b89600658b /shaping/include
parentf0c91c0cfd4ec5a8f3e6636605484f1467c40a1f (diff)
add aqm blue algorithm temp code, and some performance optimize
Diffstat (limited to 'shaping/include')
-rw-r--r--shaping/include/shaper.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/shaping/include/shaper.h b/shaping/include/shaper.h
index 069abcf..20fc9b1 100644
--- a/shaping/include/shaper.h
+++ b/shaping/include/shaper.h
@@ -117,8 +117,11 @@ struct shaping_profile_hash_node {
long long last_failed_get_token_ms;
long long last_hmget_ms;
long long queue_len[SHAPING_PRIORITY_NUM_MAX];
+ long long local_queue_len[SHAPING_PRIORITY_NUM_MAX];
+ long long local_queue_len_update_time_us[SHAPING_PRIORITY_NUM_MAX];
long long priority_blocked_time_ms[SHAPING_PRIORITY_NUM_MAX];
- int ref_cnt;
+ int hmget_ref_cnt;
+ int tconsume_ref_cnt;
struct shaper_aqm_blue_para aqm_blue_para;
unsigned char is_invalid;
UT_hash_handle hh;
@@ -185,7 +188,7 @@ struct shaping_flow {
unsigned int flag;
struct metadata ctrl_meta;
unsigned long long processed_pkts;
- struct timespec stat_update_time;
+ unsigned long long stat_update_time_us;
time_t check_rule_time;
struct timeout timeout_handle;
time_t last_update_timeout_sec;
@@ -231,8 +234,7 @@ struct shaping_packet_wrapper* shaper_first_pkt_get(struct shaping_flow *sf);
void shaper_queue_clear(struct shaping_flow *sf, struct shaping_thread_ctx *ctx);
int shaper_flow_in_order_get(struct shaper *sp, struct shaper_flow_instance sf_ins[], int priority, int max_sf_num);
-
-//enum shaping_packet_action shaper_pkt_action_decide(struct shaping_thread_ctx *ctx, struct shaping_flow *sf, int priority, int sf_in_queue);
+void shaper_profile_hash_node_update(struct shaping_profile_info *profile);
int shaper_global_conf_init(struct shaping_system_conf *conf);