From 857bdcf05a920b99e1cf180c700176b04801da00 Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 4 Jan 2016 09:49:37 -0500 Subject: some additions to the stateless simulation mode --- src/stateless/dp/trex_stateless_dp_core.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/stateless/dp/trex_stateless_dp_core.cpp') diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp index c211b9f5..0a9a88ab 100644 --- a/src/stateless/dp/trex_stateless_dp_core.cpp +++ b/src/stateless/dp/trex_stateless_dp_core.cpp @@ -353,8 +353,11 @@ void TrexStatelessDpCore::idle_state_loop() { while (m_state == STATE_IDLE) { - periodic_check_for_cp_messages(); - delay(200); + bool had_msg = periodic_check_for_cp_messages(); + /* if no message - backoff for some time */ + if (!had_msg) { + delay(200); + } } } -- cgit 1.2.3-korg