Skip to content

[Nexthop][m4062nhp] Select platform mapping and SDK YAML by switch-card revision - #1618

Draft
zackary-nexthop wants to merge 3 commits into
facebook:mainfrom
nexthop-ai:zackary-nexthop.m4062nhp.switch-card-revision
Draft

zackary-nexthop wants to merge 3 commits into
facebook:mainfrom
nexthop-ai:zackary-nexthop.m4062nhp.switch-card-revision

Conversation

@zackary-nexthop

Copy link
Copy Markdown
Contributor

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

The m4062nhp P2 switch card rewires the front panel, so a single image has to
pick the right platform mapping and HSDK YAML for the switch-card revision it
boots on.

  • The platform descriptor gains an optional pmUnitVersions matcher
    (productionState, productionSubState, respinVariantIndicator), the same
    model platform_manager already uses for versionedPmUnitConfigs. The
    descriptor registry reads the chassis EEPROM once. A versioned descriptor
    that matches wins, otherwise the unversioned descriptor is the default. If
    the EEPROM cannot be read the registry warns once and uses the default.
    Platforms without a matcher are unaffected.
  • SaiBcmPlatform::getHwConfig() loads the asic_config.yaml that sits next
    to the selected descriptor before falling back to the embedded config, so
    the SDK YAML follows the same revision selection as the mapping.
  • m4062nhp data: platform_mapping/ is the P2 default and
    variants/m4062nhp_p1/ matches productionState=1. The variant carries its
    own descriptor, static mapping, SI settings and profile settings; the port
    profile mapping and vendor config are inherited from the base. asic_config
    grows default and p1 variants. The generator itself is unchanged apart
    from parsing the new descriptor column.
  • platform_manager: the P2 SMB layout is the default with a versioned P1
    entry.

Test Plan

  • Two P1 systems select m4062nhp_p1, one P2 system selects the default. The
    mapping and SDK YAML deployed on all three are byte-identical to the
    artifacts in this PR.
  • P1 system A: 128/128 ports up, LLDP neighbours match the cabling database
    64/64.
  • P1 system B: 17/17 present transceivers up. Turning off the laser on one cage
    drops exactly that port and its cabled peer.
  • Link test passes with 5 snake pairs.
  • verify_generated_files.py passes; every other platform regenerates
    byte-identical.
  • pre-commit run passes.

@meta-cla meta-cla Bot added the CLA Signed label Sep 9, 2026
@zackary-nexthop
zackary-nexthop force-pushed the zackary-nexthop.m4062nhp.switch-card-revision branch 5 times, most recently from 6382cd2 to e9f7704 Compare September 14, 2026 13:11
@zackary-nexthop
zackary-nexthop force-pushed the zackary-nexthop.m4062nhp.switch-card-revision branch from e9f7704 to 404c86b Compare September 16, 2026 14:50
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