[action] [PR:25423] Allow for the speed change in NH-5010 by updating the config_db.json#26150
Merged
mssonicbld merged 1 commit intosonic-net:202511from Mar 13, 2026
Merged
Conversation
#### Prereq PRs: sonic-net/sonic-platform-daemons#728 sonic-net/sonic-swss#4113 #### Why I did it Prereq changes: This commit first moves all current signal integrity settings for gearboxes into the media_settings file in the device/nexthop/x86_64-nexthop_5010-r0 directory. It also removes the older configuration via gearbox_config.json so that we only have a single source of truth for all signal integrity configuration on this platform. 1) Automate generation of ASIC, gearbox, and PHY configs for different port speeds, instead of maintaining HWSKUs which are inflexible. 2) Derive configuration from platform files: a) port_speed.json (port speed profiles + ASIC/gearbox mapping) b) Q3D_ports.json (ASIC core/PM → lanes/port names) c) CONFIG_DB.PORT (actual ports, speeds, indices, lanes) 3) Add validation so invalid lane/speed combinations are caught early (before swss brings up ports). ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it 1) Changed docker image template to provide rw permission to hwsku directory to allow for the config generation. 2) The hwsku-init runs everytime the swss starts and generates the configuration file. 3) Introduced a common hwsku pipeline: a) Dataclasses for ASIC ports, gearbox ports, speed profiles, and CONFIG_DB entries. b) Loaders for: port_speed.json → per-port speed profiles + ASIC/gearbox mapping. Q3D_ports.json → core/PM → port → lane map. CONFIG_DB PORT table (or a JSON dump) → typed port map. c) Generators for: Gearbox interfaces list. Per‑PHY phy_config.json content. ASIC specific config d) A run() method that: Calls platform-specific ASIC config generation. Renders Jinja2 templates into nh5010.bcm, gearbox_config.json, and phy*_config.json, with a fallback to defaults/ on error. 4) Currently supports: (400G-4, 100G-2) ASIC config, (400G-8, 100G-4) front port on the ports 1-32. (400G-4, 100G-4) ASIC and front port config (no gearbox) on ports 33-64. #### How to verify it Validated it on mix of 100G and 400G interface: ``` root@humm119:/usr/share/sonic/device/x86_64-nexthop_5010-r0/NH-5010-F-O64# show interface status Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC ------------- --------------- ------- ----- ----- ------- ------ ------ ------- ----------------------------------------------- ---------- Ethernet0 96,97 100G 9100 rs etp1 routed up up QSFP28 or later N/A Ethernet4 100,101 100G 9100 rs etp2 routed up up QSFP28 or later N/A Ethernet8 104,105,106,107 400G 9100 rs etp3 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet12 108,109 100G 9100 rs etp4 routed up up QSFP28 or later N/A Ethernet16 112,113,114,115 400G 9100 rs etp5 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet20 116,117 100G 9100 rs etp6 routed up up QSFP28 or later N/A Ethernet24 120,121 100G 9100 rs etp7 routed up up QSFP28 or later N/A Ethernet28 124,125 100G 9100 rs etp8 routed up up QSFP28 or later N/A Ethernet32 56,57,58,59 400G 9100 rs etp9 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet36 60,61,62,63 400G 9100 rs etp10 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet40 48,49 100G 9100 rs etp11 routed up up QSFP28 or later N/A Ethernet44 52,53 100G 9100 rs etp12 routed up up QSFP28 or later N/A Ethernet48 40,41,42,43 400G 9100 rs etp13 routed down up N/A N/A Ethernet52 44,45,46,47 400G 9100 rs etp14 routed down up N/A N/A Ethernet56 32,33,34,35 400G 9100 rs etp15 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet60 36,37,38,39 400G 9100 rs etp16 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet64 128,129,130,131 400G 9100 rs etp17 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet68 132,133,134,135 400G 9100 rs etp18 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet72 136,137,138,139 400G 9100 rs etp19 routed down up N/A N/A Ethernet76 140,141,142,143 400G 9100 rs etp20 routed down up N/A N/A Ethernet80 144,145 100G 9100 rs etp21 routed up up QSFP28 or later N/A Ethernet84 148,149,150,151 400G 9100 rs etp22 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet88 152,153 100G 9100 rs etp23 routed up up QSFP28 or later N/A Ethernet92 156,157,158,159 400G 9100 rs etp24 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet96 216,217 100G 9100 rs etp25 routed up up QSFP28 or later N/A Ethernet100 220,221,222,223 400G 9100 rs etp26 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet104 208,209 100G 9100 rs etp27 routed up up QSFP28 or later N/A Ethernet108 212,213,214,215 400G 9100 rs etp28 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet112 200,201,202,203 400G 9100 rs etp29 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet116 204,205,206,207 400G 9100 rs etp30 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet120 192,193,194,195 400G 9100 rs etp31 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet124 196,197,198,199 400G 9100 rs etp32 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A Ethernet128 64,65,66,67 400G 9100 rs etp33 routed up up QSFP+ or later with CMIS N/A Ethernet132 68,69,70,71 400G 9100 rs etp34 routed up up QSFP+ or later with CMIS N/A Ethernet136 72,73,74,75 400G 9100 rs etp35 routed down up N/A N/A Ethernet140 76,77,78,79 400G 9100 rs etp36 routed down up N/A N/A Ethernet144 80,81,82,83 100G 9100 rs etp37 routed up up QSFP28 or later N/A Ethernet148 84,85,86,87 100G 9100 rs etp38 routed up up QSFP28 or later N/A Ethernet152 88,89,90,91 400G 9100 rs etp39 routed down up N/A N/A Ethernet156 92,93,94,95 400G 9100 rs etp40 routed down up N/A N/A Ethernet160 24,25,26,27 100G 9100 rs etp41 routed down up N/A N/A Ethernet164 28,29,30,31 100G 9100 rs etp42 routed up up QSFP28 or later N/A Ethernet168 16,17,18,19 100G 9100 rs etp43 routed down up N/A N/A Ethernet172 20,21,22,23 100G 9100 rs etp44 routed up up QSFP28 or later N/A Ethernet176 8,9,10,11 100G 9100 rs etp45 routed up up QSFP28 or later N/A Ethernet180 12,13,14,15 100G 9100 rs etp46 routed down up N/A N/A Ethernet184 0,1,2,3 100G 9100 rs etp47 routed up up QSFP28 or later N/A Ethernet188 4,5,6,7 100G 9100 rs etp48 routed down up N/A N/A Ethernet192 160,161,162,163 400G 9100 rs etp49 routed down up N/A N/A Ethernet196 164,165,166,167 400G 9100 rs etp50 routed down up N/A N/A Ethernet200 168,169,170,171 400G 9100 rs etp51 routed down up N/A N/A Ethernet204 172,173,174,175 400G 9100 rs etp52 routed down up N/A N/A Ethernet208 176,177,178,179 400G 9100 rs etp53 routed down up N/A N/A Ethernet212 180,181,182,183 400G 9100 rs etp54 routed down up N/A N/A Ethernet216 184,185,186,187 400G 9100 rs etp55 routed down up N/A N/A Ethernet220 188,189,190,191 400G 9100 rs etp56 routed down up N/A N/A Ethernet224 248,249,250,251 400G 9100 rs etp57 routed down up N/A N/A Ethernet228 252,253,254,255 400G 9100 rs etp58 routed down up N/A N/A Ethernet232 240,241,242,243 400G 9100 rs etp59 routed down up N/A N/A Ethernet236 244,245,246,247 400G 9100 rs etp60 routed down up N/A N/A Ethernet240 232,233,234,235 400G 9100 rs etp61 routed up up QSFP+ or later with CMIS N/A Ethernet244 236,237,238,239 400G 9100 rs etp62 routed up up QSFP+ or later with CMIS N/A Ethernet248 224,225,226,227 400G 9100 rs etp63 routed down up N/A N/A Ethernet252 228,229,230,231 400G 9100 rs etp64 routed down up N/A N/A Ethernet256 256,257,258,259 100G 9100 rs etp65 routed down up N/A N/A Ethernet260 260,261,262,263 100G 9100 rs etp66 routed down up N/A N/A Ethernet-Rec0 621 10G 9100 none Recirc0 routed up up N/A N/A ``` <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [x] 202511 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [x] master ``` SONiC OS Version: 13 OCP SAI Header Version: 1.17.1 Vendor SAI Version: 14.1.0.1.0.0.0.0 Vendor SDK Version: sdk-6.5.34-SP1 Distribution: Debian 13.3 Kernel: 6.12.41+deb13-sonic-amd64 Build commit: e73351b0e6 Build date: Mon Feb 9 23:36:58 UTC 2026 Built by: ubuntu@ip-172-31-13-36 ``` - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> Signed-off-by: Sonic Build Admin <[email protected]> #### A picture of a cute animal (not mandatory but encouraged)
Collaborator
Author
|
Original PR: #25423 |
8 tasks
Collaborator
Author
|
/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.
Prereq PRs:
sonic-net/sonic-platform-daemons#728
sonic-net/sonic-swss#4113
Why I did it
Prereq changes:
This commit first moves all current signal integrity settings for gearboxes into the media_settings file in the
device/nexthop/x86_64-nexthop_5010-r0 directory. It also removes the older configuration via gearbox_config.json so that we only have a single source of truth for all signal integrity configuration on this platform.
a) port_speed.json (port speed profiles + ASIC/gearbox mapping)
b) Q3D_ports.json (ASIC core/PM → lanes/port names)
c) CONFIG_DB.PORT (actual ports, speeds, indices, lanes)
Work item tracking
How I did it
a) Dataclasses for ASIC ports, gearbox ports, speed profiles, and CONFIG_DB entries.
b) Loaders for:
port_speed.json → per-port speed profiles + ASIC/gearbox mapping.
Q3D_ports.json → core/PM → port → lane map.
CONFIG_DB PORT table (or a JSON dump) → typed port map.
c) Generators for:
Gearbox interfaces list.
Per‑PHY phy_config.json content.
ASIC specific config
d) A run() method that:
Calls platform-specific ASIC config generation.
Renders Jinja2 templates into nh5010.bcm, gearbox_config.json, and phy*_config.json, with a fallback to defaults/ on error.
(400G-4, 100G-2) ASIC config, (400G-8, 100G-4) front port on the ports 1-32.
(400G-4, 100G-4) ASIC and front port config (no gearbox) on ports 33-64.
How to verify it
Validated it on mix of 100G and 400G interface:
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
Signed-off-by: Sonic Build Admin [email protected]
A picture of a cute animal (not mandatory but encouraged)