summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-19 18:14:58 +0200
committerimarom <imarom@cisco.com>2015-11-19 18:14:58 +0200
commit90e283923e5d860803eae5996a1247b1390ea36a (patch)
treefe71e0eef425d6aed53212eab15261b49468a464 /src
parent34191e258a032cf78a171752eece903bb06f6751 (diff)
a bug in back to back start/stop
Diffstat (limited to 'src')
-rw-r--r--src/stateless/cp/trex_dp_port_events.cpp4
-rw-r--r--src/stateless/cp/trex_stateless_port.cpp13
2 files changed, 9 insertions, 8 deletions
diff --git a/src/stateless/cp/trex_dp_port_events.cpp b/src/stateless/cp/trex_dp_port_events.cpp
index f74068a3..ba327e59 100644
--- a/src/stateless/cp/trex_dp_port_events.cpp
+++ b/src/stateless/cp/trex_dp_port_events.cpp
@@ -175,9 +175,9 @@ TrexDpPortEvent::handle_event(int thread_id, int event_id) {
return;
}
- /* check the event id is matching the required event */
+ /* check the event id is matching the required event - if not maybe its an old signal */
if (event_id != m_event_id) {
- err(thread_id, event_id, "event key mismatch");
+ return;
}
/* mark sure no double signal */
diff --git a/src/stateless/cp/trex_stateless_port.cpp b/src/stateless/cp/trex_stateless_port.cpp
index 43960d5e..795c0f12 100644
--- a/src/stateless/cp/trex_stateless_port.cpp
+++ b/src/stateless/cp/trex_stateless_port.cpp
@@ -122,14 +122,14 @@ TrexStatelessPort::start_traffic(double mul, double duration) {
/* generate a message to all the relevant DP cores to start transmitting */
m_event_id = m_dp_events.generate_event_id();
+ /* mark that DP event of stoppped is possible */
+ m_dp_events.wait_for_event(TrexDpPortEvent::EVENT_STOP, m_event_id);
+
TrexStatelessCpToDpMsgBase *start_msg = new TrexStatelessDpStart(m_event_id, compiled_obj, duration);
change_state(PORT_STATE_TX);
send_message_to_dp(start_msg);
-
- /* mark that DP event of stoppped is possible */
- m_dp_events.wait_for_event(TrexDpPortEvent::EVENT_STOP, m_event_id);
}
@@ -147,15 +147,16 @@ TrexStatelessPort::stop_traffic(void) {
return;
}
+ /* mask out the DP stop event */
+ m_dp_events.disable(TrexDpPortEvent::EVENT_STOP);
+
/* generate a message to all the relevant DP cores to start transmitting */
TrexStatelessCpToDpMsgBase *stop_msg = new TrexStatelessDpStop(m_port_id);
send_message_to_dp(stop_msg);
change_state(PORT_STATE_STREAMS);
-
- /* mask out the DP stop event */
- m_dp_events.disable(TrexDpPortEvent::EVENT_STOP);
+
}
void