diff options
author | imarom <imarom@cisco.com> | 2015-11-17 15:27:46 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2015-11-17 15:27:46 +0200 |
commit | d9ed62e91c83039521b817779b4bc0197cc8151a (patch) | |
tree | ebdef86ed9e9b07b2982ff6bcfdcef2f42b86370 /src/stateless/dp/trex_stateless_dp_core.cpp | |
parent | 07e6795a7497151e0920c82337cca6cfb5c3c3cd (diff) | |
parent | aa9bf54e6f892168482ed647a0e67ab10b1cf34a (diff) |
Merge branch 'master' of csi-sceasr-b45:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core
Conflicts:
src/main_dpdk.cpp
Diffstat (limited to 'src/stateless/dp/trex_stateless_dp_core.cpp')
-rw-r--r-- | src/stateless/dp/trex_stateless_dp_core.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp index 07e03678..0747c1a0 100644 --- a/src/stateless/dp/trex_stateless_dp_core.cpp +++ b/src/stateless/dp/trex_stateless_dp_core.cpp @@ -72,6 +72,14 @@ TrexStatelessDpCore::idle_state_loop() { } } + + +void TrexStatelessDpCore::quit_main_loop(){ + m_core->set_terminate_mode(true); /* mark it as terminated */ + add_duration(0.0001); /* add message to terminate */ +} + + /** * scehduler runs when traffic exists * it will return when no more transmitting is done on this @@ -106,6 +114,10 @@ TrexStatelessDpCore::start() { while (true) { run_once(); + + if ( m_core->is_terminated_by_master() ) { + break; + } } } |