Skip to content

[PlatformManager] pmUnitVersion support for versionedPmUnitConfigs#1065

Open
aalamsi22 wants to merge 1 commit intofacebook:mainfrom
aalamsi22:versioned_pmunit
Open

[PlatformManager] pmUnitVersion support for versionedPmUnitConfigs#1065
aalamsi22 wants to merge 1 commit intofacebook:mainfrom
aalamsi22:versioned_pmunit

Conversation

@aalamsi22
Copy link
Copy Markdown
Contributor

@aalamsi22 aalamsi22 commented Apr 7, 2026

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Platform manager has a versionedPmUnitConfigs attribute, which allows certain pmUnit configs to be overridden. However, it is only limited to changes "Product Sub-Version".

This proposal adds support for all 3 version attributes in meta-eeprom to be used in versionedPmUnitConfigs. To do that, the PmUnitVersion struct is used as suggested by the TODO comment in the thrift config.

Test Plan

  • All Swtests pass

Manual Testing of The Feature

We will be working with these set of versions on the SMB pmunit

...
Product Production State: 1
Product Version: 2
Product Sub-Version: 3
...

No versionedPmUnitConfigs present

...
DataStore.cpp:182] Resolved /SMB_SLOT@0 to default PmUnitConfig of SMB. No versioned config matches version 1.2.3
...

Testing versionedPmUnitConfigs with a duplicated SMB pmunit but removing SMB_CPLD. Setting productSubVersion set to 2 (NOT MATCHING).

  "versionedPmUnitConfigs": {
    "SMB": [
      {
        "pmUnitConfig": {
            ...
        },
        "productSubVersion": 2,
      }
    ]
  },
...
DataStore.cpp:182] Resolved /SMB_SLOT@0 to default PmUnitConfig of SMB. No versioned config matches version 1.2.3
...
# ls /run/devmap/cplds/MERU800BIA_SMB_CPLD/
driver uevent ...
...

Setting productSubVersion set to 4 (MATCHING).

...
Resolved /SMB_SLOT@0 to versioned PmUnitConfig of SMB with version 1.2.3
...
ExplorationSummary.cpp:54] =========== UNEXPECTED ERRORS ===========
ExplorationSummary.cpp:56]  /SMB_SLOT@0/[SMB_CPLD]: Failed to create symlink /run/devmap/cplds/MERU800BIA_SMB_CPLD for DevicePath /SMB_SLOT@0/[SMB_CPLD]. Reason: Couldn't find PciDeviceConfig for SMB_CPLD at /SMB_SLOT@0
...
# ls /run/devmap/cplds/MERU800BIA_SMB_CPLD/
ls: cannot access '/run/devmap/cplds/MERU800BIA_SMB_CPLD/': No such file or directory
...

Using PmUnitVersion setting to random version below (NOT MATCHING).

  "versionedPmUnitConfigs": {
    "SMB": [
      {
        "pmUnitConfig": {
            ...
        },
        "pmUnitVersion": {
            "productProductionState": 0,
            "productVersion": 2,
            "productSubVersion": 3
        }
      }
    ]
  },
...
DataStore.cpp:182] Resolved /SMB_SLOT@0 to default PmUnitConfig of SMB. No versioned config matches version 1.2.3
...
# ls /run/devmap/cplds/MERU800BIA_SMB_CPLD/
driver uevent ...

Updating PmUnitVersion to match SMB idprom (MATCHING)

"pmUnitVersion": {
    "productProductionState": 1,
    "productVersion": 2,
    "productSubVersion": 3
}
DataStore.cpp:171] Resolved /SMB_SLOT@0 to versioned PmUnitConfig of SMB with version 1.2.3
...
ExplorationSummary.cpp:54] =========== UNEXPECTED ERRORS ===========
ExplorationSummary.cpp:56]  /SMB_SLOT@0/[SMB_CPLD]: Failed to create symlink /run/devmap/cplds/MERU800BIA_SMB_CPLD for DevicePath /SMB_SLOT@0/[SMB_CPLD]. Reason: Couldn't find PciDeviceConfig for SMB_CPLD at /SMB_SLOT@0
...
# ls /run/devmap/cplds/MERU800BIA_SMB_CPLD/
ls: cannot access '/run/devmap/cplds/MERU800BIA_SMB_CPLD/': No such file or directory

@aalamsi22 aalamsi22 requested a review from a team as a code owner April 7, 2026 22:58
@meta-cla meta-cla bot added the CLA Signed label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant