Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/common/MuxPortConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ class MuxPortConfig
*/
inline void setPortCableType(PortCableType portCableType) { mPortCableType = portCableType; };

/**
* @method ifEnableSwitchoverMeasurement
*
* @brief check if the feature that decreases link prober interval to measure switch overhead is enabled or not
*
* @return if switch overhead measurement feature is enabled
*/
inline bool ifEnableSwitchoverMeasurement() {return mEnableSwitchoverMeasurement;};

private:
MuxConfig &mMuxConfig;
std::string mPortName;
Expand All @@ -300,6 +309,8 @@ class MuxPortConfig
uint16_t mServerId;
Mode mMode = Manual;
PortCableType mPortCableType;

bool mEnableSwitchoverMeasurement = false;
};

} /* namespace common */
Expand Down
4 changes: 3 additions & 1 deletion src/link_manager/LinkManagerStateMachineActiveStandby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ void ActiveStandbyStateMachine::switchMuxState(
mMuxStateMachine.setWaitStateCause(mux_state::WaitState::WaitStateCause::SwssUpdate);
mMuxPortPtr->postMetricsEvent(Metrics::SwitchingStart, label);
mMuxPortPtr->setMuxState(label);
mDecreaseIntervalFnPtr(mMuxPortConfig.getLinkWaitTimeout_msec());
if(mMuxPortConfig.ifEnableSwitchoverMeasurement()) {
mDecreaseIntervalFnPtr(mMuxPortConfig.getLinkWaitTimeout_msec());
}
mDeadlineTimer.cancel();
startMuxWaitTimer();
} else {
Expand Down