diff options
| author | liuchang <[email protected]> | 2023-07-12 06:59:16 +0000 |
|---|---|---|
| committer | liuchang <[email protected]> | 2023-07-12 06:59:16 +0000 |
| commit | d60207279f5641e993a1f19215b5c5fa6b753e21 (patch) | |
| tree | 261c8a702d15598da1b28125f397954622369086 /shaping/src/shaper.cpp | |
| parent | 684ade0e6de5fe9634fad0348ff7ab0c8ea726ff (diff) | |
optimize: don't get node from avl tree while no pkt queued
Diffstat (limited to 'shaping/src/shaper.cpp')
| -rw-r--r-- | shaping/src/shaper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shaping/src/shaper.cpp b/shaping/src/shaper.cpp index ae563d0..a8f9d06 100644 --- a/shaping/src/shaper.cpp +++ b/shaping/src/shaper.cpp @@ -917,6 +917,10 @@ END: void polling_entry(struct shaper *sp, struct shaping_stat *stat, struct shaping_thread_ctx *ctx) { + if (shaper_global_stat_queueing_pkts_get(ctx->global_stat) == 0) { + return; + } + struct shaper_flow_instance sf_ins[SHAPER_FLOW_POP_NUM_MAX]; int sf_num; int ret; |
