[device]: Add platform fallback to deduplicate pg_profile_lookup.ini#25737
Draft
Bojun-Feng wants to merge 2 commits intosonic-net:masterfrom
Draft
[device]: Add platform fallback to deduplicate pg_profile_lookup.ini#25737Bojun-Feng wants to merge 2 commits intosonic-net:masterfrom
Bojun-Feng wants to merge 2 commits intosonic-net:masterfrom
Conversation
* Add HWSKU-first, platform-fallback logic to buffermgrd.sh * If pg_profile_lookup.ini is not found in HWSKU directory, fall back to the platform directory (/usr/share/sonic/platform/) * Preserve original HWSKU path as final fallback for error logging Signed-off-by: Bojun Feng <[email protected]>
* For 25 platforms where all HWSKUs have identical pg_profile_lookup.ini, move the file to the platform directory and remove HWSKU-level copies * Platforms with HWSKU-specific differences are left untouched * This works with the buffermgrd.sh fallback added in the previous commit: HWSKU dir -> platform dir -> original HWSKU path (error) * Net reduction: 53 duplicate files removed (258 -> 205) Affected vendors: Arista, Celestica, Dell, FS, Mellanox/Nvidia, Nokia, Virtual, Wistron Signed-off-by: Bojun Feng <[email protected]>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Why I did it
Related to #25716
Currently,
pg_profile_lookup.iniis duplicated in every HWSKU directory, even when the file content is identical across all HWSKUs on a platform. The repo contains 258 copies of this file. This makes maintenance error-prone — any buffer tuning update requires editing N copies per platform.How I did it
For platforms where ALL HWSKUs have byte-identical
pg_profile_lookup.ini, moved the file to the platform directory and removed HWSKU-level copies. Platforms with HWSKU-specific differences were left untouched. Affected vendors: Arista, Celestica, Dell, FS, Mellanox/Nvidia, Nokia, Virtual, WistronModified the two
buffermgrd.shlaunch scripts to implement a fallback lookup order forpg_profile_lookup.ini.The platform directory (
/usr/share/sonic/platform) is already mounted into all containers viadocker_image_ctl.j2, so no infrastructure changes are needed.How to verify it
New fallback (deduped platforms): On a deduped platform (e.g.,
x86_64-arista_7060_cx32s), verify buffermgrd starts successfully.VS platform test: Run VS image tests — the virtual platform's files were also deduped.
Verify no regression on MIXED platforms: Platforms like
x86_64-arista_7060x6_64pe(which have differing files per HWSKU) are untouched and continue to use HWSKU-level files.Description for the changelog
Add platform-level fallback for pg_profile_lookup.ini and deduplicate identical copies across platforms, removed 53 duplicate files.