summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2017-02-05 15:52:21 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2017-02-05 15:52:21 +0200
commit935de2a8ec8fce9f6b51cf10f7d4d1ed29625420 (patch)
tree158cf4615f9a901826edf7860db461390688c8c2 /src/stateless
parent3b430b906317d4114e5ebe3e35bdd0ac430a463a (diff)
WatchDog and IO functions: ensure we return it to normal timeout in case of exceptions in the middle of function.
Change-Id: I5d2e119f19c3e3214fdbe8108ea35af899ab49a5 Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/dp/trex_stateless_dp_core.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp
index 0a317170..d8563e95 100644
--- a/src/stateless/dp/trex_stateless_dp_core.cpp
+++ b/src/stateless/dp/trex_stateless_dp_core.cpp
@@ -1282,10 +1282,7 @@ bool CGenNodePCAP::create(uint8_t port_id,
m_min_ipg_sec = min_ipg_sec;
/* increase timeout of WD due to io */
- TrexMonitor * cur_monitor = TrexWatchDog::getInstance().get_current_monitor();
- if (cur_monitor != NULL) {
- cur_monitor->io_begin();
- }
+ TrexWatchDog::IOFunction::io_begin();
/* mark this node as slow path */
set_slow_path(true);
@@ -1351,10 +1348,7 @@ void CGenNodePCAP::destroy() {
}
/* end of io, return normal timeout of WD */
- TrexMonitor * cur_monitor = TrexWatchDog::getInstance().get_current_monitor();
- if (cur_monitor != NULL) {
- cur_monitor->io_end();
- }
+ TrexWatchDog::IOFunction::io_end();
m_state = PCAP_INVALID;
}