Skip to content

Commit

Permalink
Relax Rx PFC counter check
Browse files Browse the repository at this point in the history
Summary: Rx PFC counter doesn't increment on TH5 (CS00012381334). However TX PFC counter is enough indication that PFC is being generated.

Reviewed By: nivinl

Differential Revision: D66859733

fbshipit-source-id: a1fbfea8784c23bea48417f7c45275c94384dfb9
  • Loading branch information
maxwindiff authored and facebook-github-bot committed Dec 9, 2024
1 parent 26f2ab8 commit 1569cf1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,19 @@ void waitPfcCounterIncrease(
<< ", priority: " << pfcPriority;

EXPECT_EVENTUALLY_GT(txPfcCtr, 0);
EXPECT_EVENTUALLY_GT(rxPfcCtr, 0);
if (ensemble->getSw()->getHwAsicTable()->isFeatureSupportedOnAllAsic(
facebook::fboss::HwAsic::Feature::PFC_XON_TO_XOFF_COUNTER)) {
EXPECT_EVENTUALLY_GT(rxPfcXonCtr, 0);

// TODO(maxgg): CS00012381334 - Rx counters not incrementing on TH5
// However we know PFC is working as long as TX PFC is being generated, so
// skip validating RX PFC counters on TH5 for now.
auto asicType =
facebook::fboss::utility::checkSameAndGetAsic(ensemble->getL3Asics())
->getAsicType();
if (asicType != facebook::fboss::cfg::AsicType::ASIC_TYPE_TOMAHAWK5) {
EXPECT_EVENTUALLY_GT(rxPfcCtr, 0);
if (ensemble->getSw()->getHwAsicTable()->isFeatureSupportedOnAllAsic(
facebook::fboss::HwAsic::Feature::PFC_XON_TO_XOFF_COUNTER)) {
EXPECT_EVENTUALLY_GT(rxPfcXonCtr, 0);
}
}
});
}
Expand Down

0 comments on commit 1569cf1

Please sign in to comment.