Skip to content

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

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

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

Conversation

@marif-nexthop
Copy link
Copy Markdown
Contributor

@marif-nexthop marif-nexthop commented May 21, 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

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.

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_base.yml
...
Writing to /var/FBOSS/fboss/fboss/lib/asic_config_v3/generated_asic_configs/montblanc_base.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_base.yml
wedge800bact_base.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.

@marif-nexthop marif-nexthop requested review from a team as code owners May 21, 2026 04:27
@meta-cla meta-cla Bot added the CLA Signed label May 21, 2026
add_fb_thrift_python_executable (and any add_fb_python_executable call
with TYPE dir) produces a directory whose cmake target name is suffixed
with .GEN_PY_EXE. Strip that suffix when computing the on-disk output
path, and invoke directory outputs via python3 so __main__.py runs.
Non-python targets (e.g. fboss-bspmapping-gen) continue to exec directly.
cmake/AsicConfigV2ConfigCli.cmake uses add_fb_thrift_python_executable,
which registers the cmake target with a .GEN_PY_EXE suffix. Pass the
suffixed name so build can find it; run-helper.py strips the suffix
when locating the on-disk output.
Callers can now pass a JSON object of additional cmake defines which is
merged over the hardcoded {CMAKE_BUILD_TYPE, CMAKE_CXX_STANDARD} defaults.
Caller keys win on conflict. Existing callers that do not pass the flag
are unaffected.
range-v3's test suite fails to compile under clang's -Werror,-Wnrvo.
Disable it at the cmake level via --extra-cmake-defines.
Implements `asic_config_v3` design.

Add `fboss/lib/asic_config_v3/` Python package skeleton along
with a fully defined CMake build target. This creates the basic infra of
the data-driven ASIC config generator (`asic_config_v3`) that will
replace the code-driven
`asic_config_v2` path.

The `gen.py` entry point is included with an empty `_GENERATOR_REGISTRY`
so
the `fboss-asic-config-v3-gen` target is buildable immediately; registry
entries for concrete ASIC families will be added in follow-up commits.

Ran `fboss/lib/asic_config_v3/run-helper.sh`.
Add strict JSON schemas for the Broadcom `XGS` ASIC config, the platform
config, and the shared vendor common JSONs. Include a validation script
that scans the `asic_config_v3` directory tree and validates every
matching file
against its schema.
@marif-nexthop marif-nexthop force-pushed the marif.fboss-asic-config-v3-4 branch from 1414f67 to b17f6bf Compare May 21, 2026 04:45
In this PR, introduce the `asic_config_v3` Broadcom XGS generator class
along with the shared XGS SDK and SAI common JSONs, and per-ASIC JSONs
for Tomahawk 5 and Tomahawk 6. Registered both ASICs in gen.py's
`_GENERATOR_REGISTRY` and extend the CMake target SOURCES with the new
generator file.

After this commit the `asic_config_v3` package can generate XGS configs
for any platform whose `asic_config.json` references `tomahawk5` or
`tomahawk6`.

No platforms are registered yet but will be added in the next PR.
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 b17f6bf to d038b30 Compare May 21, 2026 04:51
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