summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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,