Skip to content
Open
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
8 changes: 6 additions & 2 deletions fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,17 @@ class AgentSflowMirrorTest : public AgentHwTest {
}

PortID getNonSflowSampledInterfacePort() const {
return checkSameAndGetAsic()->isSupported(HwAsic::Feature::MANAGEMENT_PORT)
return checkSameAndGetAsic()->isSupported(
HwAsic::Feature::MANAGEMENT_PORT) &&
!masterLogicalPortIds({cfg::PortType::MANAGEMENT_PORT}).empty()
? masterLogicalPortIds({cfg::PortType::MANAGEMENT_PORT})[0]
: masterLogicalInterfacePortIds()[0];
}

cfg::PortType getNonSflowSampledInterfacePortType() const {
return checkSameAndGetAsic()->isSupported(HwAsic::Feature::MANAGEMENT_PORT)
return checkSameAndGetAsic()->isSupported(
HwAsic::Feature::MANAGEMENT_PORT) &&
!masterLogicalPortIds({cfg::PortType::MANAGEMENT_PORT}).empty()
? cfg::PortType::MANAGEMENT_PORT
: cfg::PortType::INTERFACE_PORT;
}
Expand Down