Skip to content

Commit

Permalink
Modify PFC WD values being configured to be same as what will be prog…
Browse files Browse the repository at this point in the history
…rammed

Summary:
As titled, this bridges the gap with the value configured, but there are 2 CSPs open
which are also needed to fix this test fully.

Reviewed By: jasmeetbagga

Differential Revision: D66739282

fbshipit-source-id: a11b982d7784d5cde9530970f50ca653bac1209d
  • Loading branch information
Nivin Lawrence authored and facebook-github-bot committed Dec 7, 2024
1 parent 6316007 commit 8d08d80
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,16 @@ void SaiPortManager::attributesFromSaiStore(
SaiPortTraits::Attributes::QosPfcPriorityToQueueMap{});
getAndSetAttribute(
port->attributes(), attributes, SaiPortTraits::Attributes::TamObject{});
#if SAI_API_VERSION >= SAI_VERSION(1, 10, 2)
getAndSetAttribute(
port->attributes(),
attributes,
SaiPortTraits::Attributes::PfcTcDldInterval{});
getAndSetAttribute(
port->attributes(),
attributes,
SaiPortTraits::Attributes::PfcTcDlrInterval{});
#endif
if (platform_->getAsic()->isSupported(
HwAsic::Feature::PORT_TTL_DECREMENT_DISABLE)) {
getAndSetAttribute(
Expand Down
7 changes: 6 additions & 1 deletion fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,17 @@ class AgentTrafficPfcWatchdogTest : public AgentTrafficPfcTest {
cfg::PfcWatchdog pfcWatchdog;
if (enable) {
pfcWatchdog.recoveryAction() = cfg::PfcWatchdogRecoveryAction::NO_DROP;
// Configure values that works for specific HW, include ASIC type checks
// if needed, given some HW has limitations on the specific values that
// can be programmed and we need to ensure that the configured value here
// is in sync with what is in SAI/SDK to avoid a reprogramming attempt
// during warmboot.
if (canTriggerPfcDeadlockDetectionWithTraffic()) {
pfcWatchdog.recoveryTimeMsecs() = 10;
pfcWatchdog.detectionTimeMsecs() = 1;
} else {
pfcWatchdog.recoveryTimeMsecs() = 1000;
pfcWatchdog.detectionTimeMsecs() = 200;
pfcWatchdog.detectionTimeMsecs() = 198;
}
}

Expand Down

0 comments on commit 8d08d80

Please sign in to comment.