Skip to content

[Nexthop][NPI] "asic_config_v3" part 4 - Add platform configurations#1221

Closed
marif-nexthop wants to merge 4 commits into
facebook:mainfrom
nexthop-ai:marif.fboss-asic-config-v3-4
Closed

[Nexthop][NPI] "asic_config_v3" part 4 - Add platform configurations#1221
marif-nexthop wants to merge 4 commits into
facebook:mainfrom
nexthop-ai:marif.fboss-asic-config-v3-4

Conversation

@marif-nexthop

@marif-nexthop marif-nexthop commented May 21, 2026

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

Implements asic_config_v3 design.

In this PR, add platform configurations for the four core XGS platforms which were originally generated by asic_config_v2:

  • montblanc
  • icecube800bc
  • icecube800banw
  • wedge800bact

After this commit the asic_config_v3 generator produces four XGS output files which should be identical to the asic_config_v2 output.

Note: After review comments, changed variant name base to default.
v2: montblanc_base.yml
v3: montblanc_defaultyml

v2: wedge800bact_base.yml
v3: wedge800bact_default.yml

Test Plan

Ran fboss/lib/asic_config_v3/run-helper.sh to generate asic_config_v3 output:

Completed build for fboss-asic-config-v3-gen.GEN_PY_EXE
...
Writing to /var/FBOSS/fboss/fboss/lib/asic_config_v3/generated_asic_configs/icecube800banw_default.yml
...
Writing to /var/FBOSS/fboss/fboss/lib/asic_config_v3/generated_asic_configs/wedge800bact_default.yml
...
Writing to /var/FBOSS/fboss/fboss/lib/asic_config_v3/generated_asic_configs/montblanc_default.yml
...
Writing to /var/FBOSS/fboss/fboss/lib/asic_config_v3/generated_asic_configs/icecube800bc_default.yml
Configs have been written to specified output directory

$ ls -1 fboss/lib/asic_config_v3/generated_asic_configs
icecube800banw_default.yml
icecube800bc_default.yml
montblanc_default.yml
wedge800bact_default.yml

The generated output files are byte-identical with asic_config_v2
output

$ diff -r fboss/lib/asic_config_v3/generated_asic_configs/ fboss/lib/asic_config_v2/generated_asic_configs/
<no diff>

Schema validation also passed for all files

$ python3 ./fboss/lib/asic_config_v3/validation/validate_asic_configs.py
Vendor common configs (vendor_common.schema.json):
  vendors/broadcom/xgs/sai_common.json: PASSED
  vendors/broadcom/xgs/sdk_common.json: PASSED

Broadcom XGS ASIC configs (broadcom_xgs_asic_config.schema.json):
  vendors/broadcom/xgs/asics/tomahawk5.json: PASSED
  vendors/broadcom/xgs/asics/tomahawk6.json: PASSED

Platform configs (platform_config.schema.json):
  platforms/icecube800banw/asic_config.json: PASSED
  platforms/icecube800bc/asic_config.json: PASSED
  platforms/montblanc/asic_config.json: PASSED
  platforms/wedge800bact/asic_config.json: PASSED

8 passed, 0 failed

This PR is created on top of

so it contains diff from these PRs. When these PRs will merge, this PR will have a shorter diff.

In this PR, add platform configurations for the four core XGS platforms
which were originally generated by `asic_config_v2`:
- montblanc
- icecube800bc
- icecube800banw
- wedge800bact

After this commit the `asic_config_v3` generator produces four XGS
output files which should be identical to the `asic_config_v2` output.
@marif-nexthop marif-nexthop force-pushed the marif.fboss-asic-config-v3-4 branch from e4ef252 to e3c765e Compare June 24, 2026 19:36
@marif-nexthop

Copy link
Copy Markdown
Contributor Author

Rebased on the latest main after #1220 merged.

@joseph5wu joseph5wu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see any generated_asic_config files for the four platforms.
Did you forget to git add them

},
"variants": {
"base": {}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep "default" as the only "default" and retire "base" here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not add generated files as I assumed the user will generate a fresh copy when they need it (and these are large YAML file) but I see that asic_config_v2 has generated files also under git.
I can add the generated file into git if that is what you prefer.

@marif-nexthop marif-nexthop Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep "default" as the only "default" and retire "base" here.

OK, in that case we'll have to diff asic_config_v2/generated_asic_configs/montblanc_base.yml with asic_config_v3/generated_asic_configs/montblanc_default.yml and so on.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marif-nexthop Yeah let's generated the config so that we can tell the difference if someone changes the input json, we can have a better idea of what will it change from the last asic config.
Ideally, I would like to have an automation config(cmake and our internal buck) to generate the asic configs based on these input jsons so we don't need to worry that people forgot to update the generated_asic_configs.
Can you check how does asic_config_v2 handles this auto generate logic to see whether we can do the same for v3.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variants are changed from base to default and generated output files are add to git now.

Check in the generated ASIC config YAML for the four platforms added in this
PR so the outputs are reviewable alongside their inputs:
  - icecube800banw_default.yml
  - icecube800bc_default.yml
  - montblanc_base.yml
  - wedge800bact_base.yml
…ault

Rename the sole variant of montblanc and wedge800bact from "base" to "default"
for consistency with the other platforms. The variant name only affects the
output filename, not the generated content: regenerating produces
montblanc_default.yml and wedge800bact_default.yml byte-identical to the prior
montblanc_base.yml and wedge800bact_base.yml (verified by rebuild + diff).
The generated ASIC config YAML are multi-document streams with complex
(dict-valued) mapping keys, which PyYAML cannot load, so the check-yaml
pre-commit hook fails on them. They are generated artifacts whose format
matches asic_config_v2 output and must not be modified. Exclude the
generated_asic_configs dir from check-yaml; the other hooks
(trailing-whitespace, end-of-file-fixer, check-json) still apply.
@meta-codesync

meta-codesync Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@joseph5wu has imported this pull request. If you are a Meta employee, you can view this in D109735092.

@meta-codesync meta-codesync Bot closed this in e05feac Jun 25, 2026
@meta-codesync

meta-codesync Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@joseph5wu merged this pull request in e05feac.

@meta-codesync meta-codesync Bot added the Merged label Jun 25, 2026
@rabbit-nexthop rabbit-nexthop deleted the marif.fboss-asic-config-v3-4 branch June 26, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment