-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DPB] sonic-cfggen does not correctly match breakout modes with different default speed #7958
Comments
@alexrallen please provide more detail on your proposal. |
To resolve this we would improve This would require parsing the breakout string and matching using logic rather than string comparison. A breakout configuration with the same supported speeds and a different default speed should be considered functionally equivalent and correctly match rather than having to add a new entry to platform.json for each new default speed for each new SKU. |
…ed breakout modes. (#9278) Closes #7958 #### Why I did it The previous implementation of sonic-cfggen did a simple comparison between default breakout mode in hwsku.json and supported modes in platform.json. To set a different default speed in hwsku.json it was required to add one more entry to supported modes in platfrom.json file: 1x10G[100G,50G] vs 1x100G[50G,10G] The new implementation does more intelligent parsing and analysis of supported and default modes. It allows changing default speed without adding a new entry to platform.json. #### How I did it Add more intelligent parsing and analysis of supported and default modes. #### How to verify it Run sonic-config-engine unit tests from sonic-config-engine/tests directory
…ed breakout modes. (#9278) Closes #7958 #### Why I did it The previous implementation of sonic-cfggen did a simple comparison between default breakout mode in hwsku.json and supported modes in platform.json. To set a different default speed in hwsku.json it was required to add one more entry to supported modes in platfrom.json file: 1x10G[100G,50G] vs 1x100G[50G,10G] The new implementation does more intelligent parsing and analysis of supported and default modes. It allows changing default speed without adding a new entry to platform.json. #### How I did it Add more intelligent parsing and analysis of supported and default modes. #### How to verify it Run sonic-config-engine unit tests from sonic-config-engine/tests directory
…ed breakout modes. (#9278) Closes #7958 #### Why I did it The previous implementation of sonic-cfggen did a simple comparison between default breakout mode in hwsku.json and supported modes in platform.json. To set a different default speed in hwsku.json it was required to add one more entry to supported modes in platfrom.json file: 1x10G[100G,50G] vs 1x100G[50G,10G] The new implementation does more intelligent parsing and analysis of supported and default modes. It allows changing default speed without adding a new entry to platform.json. #### How I did it Add more intelligent parsing and analysis of supported and default modes. #### How to verify it Run sonic-config-engine unit tests from sonic-config-engine/tests directory
Currently sonic-cfggen does a very simple comparison between breakout modes in hwsku.json and supported modes in platform.json this means if you want to have a mode with a different default speed than is defined in platform.json
i.e. 1x10G[100G,50G] vs 1x100G[50G,10G]
Then you need an independent entry in platform.json. This is not best practice for these files as it will bloat quickly and become unmaintainable.
Steps to Reproduce
Open platform.json and locate a supported breakout mode for a port (i.e. 4x25G[10G] for Ethernet0)
Open hwsku.json and locate the default breakout mode for the port
Change the platform.json breakout mode to an equivalent one with a different default (i.e. 4x10G[25G])
Run
sonic-cfggen --preset t1 -p -H -k [SKU YOU MODIFIED]
Observed Results
Expected Results
Prints a config.json where the speed of the port you configured is the default speed defined in hwsku.json
Version Info
The text was updated successfully, but these errors were encountered: