From 935de2a8ec8fce9f6b51cf10f7d4d1ed29625420 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Sun, 5 Feb 2017 15:52:21 +0200 Subject: 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 --- src/stateless/dp/trex_stateless_dp_core.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 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 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; } -- cgit 1.2.3-korg