diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-25 15:30:38 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-25 15:30:38 +0200 |
commit | f5350dfb9a746c9c70e2b7dcc879ac474ac6d3e0 (patch) | |
tree | a56559bfbff686ebb5c261521df66a6357f1d70a /src/main_dpdk.cpp | |
parent | 7c25e2016ae0ce0991f21bc1e4c60d071db3e452 (diff) |
Disable watchdog for 5 seconds at Mellanox link up/down command
Change-Id: If19c9c0d3e5d684e6157ab5c71a927e2e89b8211
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/main_dpdk.cpp')
-rw-r--r-- | src/main_dpdk.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 4c448063..320a21d3 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -4766,13 +4766,14 @@ int CGlobalTRex::run_in_master() { slow_path_counter = 0; } + m_monitor.disable(30); //assume we will wake up cp_lock.unlock(); delay(FASTPATH_DELAY_MS); slow_path_counter += FASTPATH_DELAY_MS; cp_lock.lock(); - m_monitor.tickle(); + m_monitor.enable(); } /* on exit release the lock */ @@ -7466,6 +7467,21 @@ bool DpdkTRexPortAttr::is_loopback() const { return g_trex.lookup_port_by_mac(m_layer_cfg.get_ether().get_dst(), port_id); } + +int +DpdkTRexPortAttrMlnx5G::set_link_up(bool up) { + TrexMonitor * cur_monitor = TrexWatchDog::getInstance().get_current_monitor(); + if (cur_monitor != NULL) { + cur_monitor->disable(5); // should take ~2.5 seconds + } + int result = DpdkTRexPortAttr::set_link_up(up); + if (cur_monitor != NULL) { + cur_monitor->enable(); + } + return result; +} + + /** * marks the control plane for a total server shutdown * |