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 /shaping/src/shaper.cpp | |
| parent | 2a4f87a098b07e42e3178814f20dae28f06b1b83 (diff) | |
当borrow profile的AQM判定为丢包时,只将当前profile移除AVL队列,不影响其他borrow profile
Diffstat (limited to 'shaping/src/shaper.cpp')
| -rw-r--r-- | shaping/src/shaper.cpp | 9 |
1 files changed, 5 insertions, 4 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); + } } } |
