[PlatformManager] allow pciDeviceConfigs diff across versioned PmUnits#1137
[PlatformManager] allow pciDeviceConfigs diff across versioned PmUnits#1137aalamsi22 wants to merge 4 commits into
Conversation
e6910da to
45591a4
Compare
|
@lohithchittineni - can you please verify how this works with all the validation for the BlockConfigs you added. |
|
@lohithchittineni has imported this pull request. If you are a Meta employee, you can view this in D109851161. |
lohithchittineni
left a comment
There was a problem hiding this comment.
This adds pciDeviceConfigs to the fields allowed to differ across versioned PmUnits. Since ledCtrlBlockConfigs/xcvrCtrlBlockConfigs are nested inside pciDeviceConfigs, a version can now ship an under-covering set of LED/xcvr ctrl blocks.
That breaks the coverage validators: isValidLedCtrlBlockXcvrCoverage and isValidXcvrCtrlBlockXcvrCoverage only iterate *config.pmUnitConfigs() and never look at versionedPmUnitConfigs(). Previously safe (versioned PCI had to match default), but now a version that drops an LED/xcvr block leaves xcvrs uncovered and still passes validation, surfacing only at runtime.
numXcvrs is a single version-invariant PlatformConfig field, so every version's coverage target is the same *config.numXcvrs(); only the resolved block set varies.
Suggested fix: validate each constructed config independently, not a merged set. The existing default-only coverage check stays. In addition, for each versionedPmUnitConfig, build the config the runtime would actually use (the default pmUnitConfigs map, but with the overridden PmUnit's pciDeviceConfigs swapped in for its default), and re-run the [1, numXcvrs] coverage check against that. Each version must independently cover all xcvrs; don't union default and versioned blocks together, since that could hide a version that drops coverage. Please also add ConfigValidator tests that exercise these versioned configs, including a case where a version under-covers xcvrs and is expected to fail.
Summary
Allow a pmunit's pci Device content to differ across default and versioned PmUnits.
Depends on the changes here #1065 which add pmUnitVersion to versionedPmUnitConfigs
Test Plan
Testing on Typical SCM Configs
Testing versioned pm unit (SCM) with modified configs
Observe SCM_FPGA_INFO_ROM is not created anymore and 4 i2c adapters are created.
Changing versioned SCM to a non-matching version
As expected, platform manager loads the default PmUnits
Testing on Typical SMB Configs
Testing versioned pm unit (SMB) with modified configs. Add "TEST" suffix to pmUnitScopedNames
SMB_ADC doesn't get created as expected when the versioned pmunit is used.
Hw & Sw Tests
platform_manager_hw_test ran against default & versioned PmUnit