diff options
| author | root <[email protected]> | 2024-03-13 07:20:13 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2024-03-13 07:20:13 +0000 |
| commit | 4fd93f516c031dc4d3996c2e9e6e04a6e28d2f0b (patch) | |
| tree | 43b3a0313576fbbca2f03c2ee65d2e320c8f6fe9 | |
| parent | 2a4f87a098b07e42e3178814f20dae28f06b1b83 (diff) | |
当borrow profile的AQM判定为丢包时,只将当前profile移除AVL队列,不影响其他borrow profile
| -rw-r--r-- | shaping/src/shaper.cpp | 9 | ||||
| -rw-r--r-- | shaping/src/shaper_aqm.cpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/shaping/src/shaper.cpp b/shaping/src/shaper.cpp index 0092ae2..2ff490d 100644 --- a/shaping/src/shaper.cpp +++ b/shaping/src/shaper.cpp @@ -341,10 +341,11 @@ static void shaper_flow_specific_borrow_priority_pop(struct shaping_thread_ctx * assert(pkt_wrapper != NULL); for (int i = 0; i < s_rule_info->borrowing_num; i++) { - priority = s_rule_info->borrowing[i].priority; - if (avl_node_in_tree(s_node->avl_node[priority])) { - avl_tree_node_remove(sp->priority_trees[priority], s_node->avl_node[priority]); - shaper_stat_queueing_pkt_dec(&s_rule_info->borrowing[i].stat, pkt_wrapper->direction, ctx->thread_index); + if (priority == s_rule_info->borrowing[i].priority) { + if (avl_node_in_tree(s_node->avl_node[priority])) { + avl_tree_node_remove(sp->priority_trees[priority], s_node->avl_node[priority]); + shaper_stat_queueing_pkt_dec(&s_rule_info->borrowing[i].stat, pkt_wrapper->direction, ctx->thread_index); + } } } diff --git a/shaping/src/shaper_aqm.cpp b/shaping/src/shaper_aqm.cpp index 96d3e8b..5f2a860 100644 --- a/shaping/src/shaper_aqm.cpp +++ b/shaping/src/shaper_aqm.cpp @@ -32,7 +32,7 @@ int shaper_aqm_codel_need_drop(int profile_id, struct shaper_aqm_codel_para *par if (latency_ms < CODEL_MAX_LATENCY) { if (para->state != CODEL_STATE_NORMAL) { para->state = CODEL_STATE_NORMAL; - LOG_INFO("%s: profile id: %d codel enter state CODEL_STATE_NORMAL", LOG_TAG_SHAPING, profile_id); + LOG_INFO("%s: profile id: %d codel enter state CODEL_STATE_NORMAL, last DROPPING_PHASE drop count %d", LOG_TAG_SHAPING, profile_id, para->drop_count); } return 0; |
