[Nexthop][NPI] "asic_config_v3" part 3 - Broadcom XGS generator and vendor data#1220
Open
marif-nexthop wants to merge 8 commits into
Open
[Nexthop][NPI] "asic_config_v3" part 3 - Broadcom XGS generator and vendor data#1220marif-nexthop wants to merge 8 commits into
marif-nexthop wants to merge 8 commits into
Conversation
2 tasks
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.
79b351d to
798177b
Compare
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.
798177b to
59c9a90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
Implements
asic_config_v3design.In this PR, introduce the
asic_config_v3Broadcom 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_REGISTRYand extend the CMake target SOURCES with the new generator file.After this commit the
asic_config_v3package can generate XGS configs for any platform whoseasic_config.jsonreferencestomahawk5ortomahawk6.No platforms are registered yet but will be added in the following PRs.
Test Plan
Running
fboss/lib/asic_config_v3/run-helper.shis no-op as there are no platforms added yet. The platforms will be added in the following PRs.Schema validation passes for all files.
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.