diff options
| author | 刘畅 <[email protected]> | 2023-05-30 09:48:18 +0000 |
|---|---|---|
| committer | 刘畅 <[email protected]> | 2023-05-30 09:48:18 +0000 |
| commit | bec95db1ec0ba5af97a96c4b0c0177bd73c81c69 (patch) | |
| tree | 14d9c4e94dfcd0d760dbe1830a3cc10c4ce8cb84 /shaping/include | |
| parent | 57efeb63d5769c9f1b92b1266780968ad1c30d78 (diff) | |
| parent | 797b56c2a92dd4bc934c515c01ad3a1192fe8655 (diff) | |
Merge branch 'feature_splitby_fairness_new' into 'rel'
Feature splitby fairness new
See merge request tango/shaping-engine!20
Diffstat (limited to 'shaping/include')
| -rw-r--r-- | shaping/include/shaper.h | 15 | ||||
| -rw-r--r-- | shaping/include/shaper_maat.h | 3 |
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; |
