[Celestica] Leh800bcls: Resolve buffer pool size config crash on dual-NPU platforms during PFC tests - #1499
[Celestica] Leh800bcls: Resolve buffer pool size config crash on dual-NPU platforms during PFC tests#1499gang-tao wants to merge 1 commit into
Conversation
|
@jchallag has imported this pull request. If you are a Meta employee, you can view this in D115625388. |
|
|
||
| if (asicConfig.npuEntries().has_value()) { | ||
| for (auto& [_, entry] : *asicConfig.npuEntries()) { | ||
| if (entry.getType() == cfg::AsicConfigEntry::Type::yamlConfig) { |
There was a problem hiding this comment.
[fboss/agent/test/utils/ConfigUtils.cpp - Lines 1710-1718] The type-dispatch block inside the npuEntries loop (lines 1712-1716) duplicates the exact same pattern applied to common just above (lines 1703-1708). Per the fbcode C++ guideline "Do not repeat yourself. Always create a function for it", consider extracting this into a small local lambda (e.g., auto applyOverrides = [&](cfg::AsicConfigEntry& entry) { ... };) and invoking it for both common and each NPU entry. This keeps the two code paths in lock-step should another AsicConfigEntry::Type be added later.
There was a problem hiding this comment.
Good catch, Thanks for the comment!
Extracted the duplicate type-dispatch logic into a local lambda applyOverrides and applied it to both common and npuEntries to eliminate redundancy and keep them perfectly in lock-step.
…-NPU platforms during PFC tests
513d129 to
6939a92
Compare
|
@gang-tao has updated the pull request. You must reimport the pull request before landing. |
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
During the execution of the
AgentTrafficPfcTestsuite (e.g.,verifyPfcWithDefaultCfg) on Leh800bcls, the hardware agent process (fboss_hw_agent-sai_impl) crashes during initialization. The crash is triggered by aSAI_STATUS_INVALID_PARAMETERexception when attempting to assign aBufferProfileIdto an egress queue.Root Cause
Currently on the 2-NPU Leh800bcls platform, different NPUs use different YAML files, so the YAML files are placed under npuEntries as follows.
The test infrastructure helper
modifyPlatformConfig()only apply overrides (including injecting theSKIP_BUFFER_RESERVATION: 1entry viamodifyYamlFunc) to thecommonblock.Since
SKIP_BUFFER_RESERVATION: 1was never injected into the NPU-specific configurations, the independent hardware agent processes parsed and applied the unmodifiedyamlConfigfromnpuEntries. During SDK initialization, the driver (unconditionally) accumulated the default egress queue minimum guarantees across all active physical lanes, resulting in a locked static reserved buffer size of5745600bytes (5.48MB). This physical reservation threshold exceeded the overridden pool capacity of 1.5MB, causing the SDK parameters validation to fail and crash the hardware process.Solution
Refactor
modifyPlatformConfig()inConfigUtils.cppto also check and traverse thenpuEntriesmapping insideasicConfig.If
npuEntriesare populated, the helper dynamically applies the yaml config overrides (modifyYamlFuncandmodifyMapFunc) to each individual NPU-specific entry in addition to the common block. This ensures thatSKIP_BUFFER_RESERVATION: 1is successfully injected into the respective NPU configurationsTest Plan
The AgentTrafficPfcTests related tests passed successfully on both npu0 and npu1.