summaryrefslogtreecommitdiff
path: root/shaping/include
diff options
context:
space:
mode:
author刘畅 <[email protected]>2023-05-31 03:06:52 +0000
committer刘畅 <[email protected]>2023-05-31 03:06:52 +0000
commit7361fcee06190b68bcfb1d5a93c85df8062bb30d (patch)
treec0c9f864d8e940e4df076e5674808630241667f4 /shaping/include
parent3e7e3ba55af41456a879b9cf644ac809e9d6c766 (diff)
parentbec95db1ec0ba5af97a96c4b0c0177bd73c81c69 (diff)
Merge branch 'rel' into 'add_global_metrics_table'
# Conflicts: # shaping/src/shaper.cpp
Diffstat (limited to 'shaping/include')
-rw-r--r--shaping/include/shaper.h15
-rw-r--r--shaping/include/shaper_maat.h3
2 files changed, 14 insertions, 4 deletions
diff --git a/shaping/include/shaper.h b/shaping/include/shaper.h
index eb0ca65..cc7c608 100644
--- a/shaping/include/shaper.h
+++ b/shaping/include/shaper.h
@@ -67,13 +67,21 @@ enum shaping_packet_action {
SHAPING_DROP
};
+enum shaping_profile_type_in_rule {
+ PROFILE_IN_RULE_TYPE_PRIMARY = 0,
+ PROFILE_IN_RULE_TYPE_BORROW
+};
+
enum shaping_profile_type {
- SHAPING_PROFILE_TYPE_PRIMARY = 0,
- SHAPING_PROFILE_TYPE_BORROW
+ PROFILE_TYPE_GENERIC,
+ PROFILE_TYPE_HOST_FARINESS,
+ PROFILE_TYPE_MAX_MIN_HOST_FAIRNESS,
+ PROFILE_TYPE_SPLIT_BY_LOCAL_HOST
};
struct shaping_profile_info {
int id;//profile_id
+ enum shaping_profile_type type;
int priority;
int in_deposit_token;
int out_deposit_token;
@@ -88,6 +96,7 @@ struct shaping_profile_info {
struct shaping_rule_info {
int vsys_id;
int id;//rule_id
+ int fair_factor;
struct shaping_profile_info primary;
struct shaping_profile_info borrowing[SHAPING_REF_PROFILE_NUM_MAX];
int borrowing_num;
@@ -119,6 +128,8 @@ struct metadata
struct shaping_flow {
struct addr_tuple4 tuple4;
+ char *src_ip_str;
+ size_t src_ip_str_len;
struct delay_queue packet_queue;
struct shaping_rule_info matched_rule_infos[SHAPING_RULE_NUM_MAX];
int priority;
diff --git a/shaping/include/shaper_maat.h b/shaping/include/shaper_maat.h
index 9390161..df3558f 100644
--- a/shaping/include/shaper_maat.h
+++ b/shaping/include/shaper_maat.h
@@ -18,8 +18,7 @@ struct shaping_rule {
struct shaping_profile {
int id;
- int split;
- int host_fairness;
+ enum shaping_profile_type type;
int in_limit_bandwidth;
int out_limit_bandwidth;
int valid;