summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-05-17 14:01:03 +0300
committerimarom <imarom@cisco.com>2016-05-17 14:01:03 +0300
commit8b1d07ff4019df739a233cdcb812048ee44ae554 (patch)
tree3d7b32ab19701c29db15da9bb39aeb46607d0269 /src
parentf7ebbddbef19bf8bd362cfbe4772dfb65568285b (diff)
flush TX queue before sending done message to CP
Diffstat (limited to 'src')
-rwxr-xr-xsrc/bp_sim.h4
-rw-r--r--src/stateless/dp/trex_stateless_dp_core.cpp3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/bp_sim.h b/src/bp_sim.h
index 6c8911e5..ff80b560 100755
--- a/src/bp_sim.h
+++ b/src/bp_sim.h
@@ -3629,6 +3629,10 @@ public:
m_node_gen.set_vif(v_if);
}
+ void flush_tx_queue() {
+ m_node_gen.m_v_if->flush_tx_queue();
+ }
+
/* return the dual port ID this thread is attached to in 4 ports configuration
there are 2 dual-ports
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp
index c5963625..3d99e0fd 100644
--- a/src/stateless/dp/trex_stateless_dp_core.cpp
+++ b/src/stateless/dp/trex_stateless_dp_core.cpp
@@ -1095,6 +1095,9 @@ TrexStatelessDpCore::stop_traffic(uint8_t port_id,
}
+ /* flush the TX queue before sending done message to the CP */
+ m_core->flush_tx_queue();
+
CNodeRing *ring = CMsgIns::Ins()->getCpDp()->getRingDpToCp(m_core->m_thread_id);
TrexStatelessDpToCpMsgBase *event_msg = new TrexDpPortEventMsg(m_core->m_thread_id,
port_id,