summaryrefslogtreecommitdiffstats
path: root/src/bp_sim.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-24 11:54:58 +0200
committerimarom <imarom@cisco.com>2015-11-24 11:54:58 +0200
commitac6f8e7c7c4e957a31c19c1fe4a0997009c6e733 (patch)
tree721101231fb692fed6028b21628cb861f3c64019 /src/bp_sim.cpp
parent161a85c57c3d2a165e4fa94140d67db05714a7d3 (diff)
parent1e1c11059b7f7fcb5c160dffe2df832a8adf719d (diff)
Merge branch 'master' of csi-sceasr-b45:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core
Diffstat (limited to 'src/bp_sim.cpp')
-rwxr-xr-xsrc/bp_sim.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp
index f8dd20a1..a61fbb8f 100755
--- a/src/bp_sim.cpp
+++ b/src/bp_sim.cpp
@@ -3186,6 +3186,7 @@ bool CFlowGenListPerThread::Create(uint32_t thread_id,
uint32_t max_threads){
+ m_non_active_nodes = 0;
m_terminated_by_master=false;
m_flow_list =flow_list;
m_core_id= core_id;
@@ -3655,8 +3656,8 @@ CNodeGenerator::handle_slow_messages(uint8_t type,
thread->check_msgs(); /* check messages */
m_v_if->flush_tx_queue(); /* flush pkt each timeout */
- /* on always (clean queue path) and queue empty - exit */
- if ( always && (m_p_queue.empty()) ) {
+ /* exit in case this is the last node*/
+ if ( m_p_queue.size() == m_parent->m_non_active_nodes ) {
thread->free_node(node);
exit_scheduler = true;
} else {