Skip to content

[code sync] Merge code from sonic-net/sonic-buildimage:202511 to 202603#2209

Merged
mssonicbld merged 3 commits intoAzure:202603from
mssonicbld:sonicbld/202603-merge
Apr 22, 2026
Merged

[code sync] Merge code from sonic-net/sonic-buildimage:202511 to 202603#2209
mssonicbld merged 3 commits intoAzure:202603from
mssonicbld:sonicbld/202603-merge

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

* 916d1aa4f - (head/202511) Add MMU/QoS and cable length config for Regional Hub device types (#26906) (2026-04-22) [mssonicbld]
* 9dae5b63d - [build] Avoid using jsonpath_ng v1.8.0 in sonic slave image. (#26920) (2026-04-21) [mssonicbld]<br>```

mssonicbld and others added 3 commits April 21, 2026 20:13
<!--
 Please make sure you've read and understood our contributing guidelines:
 https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

 failure_prs.log skip_prs.log Make sure all your commits include a signature generated with `git commit -s` **

 If this is a bug fix, make sure your description includes "fixes #xxxx", or
 "closes #xxxx" or "resolves #xxxx"

 Please provide the following information:
-->

#### Why I did it
When the version of jsonpath_ng is 1.8.0, the build fails on ` target/debs/bookworm/libsai_1.0.0_amd64.deb`
```
./sai_api_gen.py \
	/bmv2/dash_pipeline.bmv2/dash_pipeline_p4rt.json \
	--ir /bmv2/dash_pipeline.bmv2/dash_pipeline_ir.json \
	--ignore-tables=underlay_mac,eni_meter,slb_decap \
	--sai-spec-dir=specs \
	dash
Traceback (most recent call last):
 File "/sonic/src/dash-sai/DASH/dash-pipeline/SAI/./sai_api_gen.py", line 44, in <module>
 var_ref_graph = P4VarRefGraph(p4ir)
 ^^^^^^^^^^^^^^^^^^^
 File "/sonic/src/dash-sai/DASH/dash-pipeline/SAI/utils/p4ir/p4ir_var_ref_graph.py", line 15, in __init__
 self.__build_graph()
 File "/sonic/src/dash-sai/DASH/dash-pipeline/SAI/utils/p4ir/p4ir_var_ref_graph.py", line 18, in __build_graph
 self.__build_counter_list()
 File "/sonic/src/dash-sai/DASH/dash-pipeline/SAI/utils/p4ir/p4ir_var_ref_graph.py", line 28, in __build_counter_list
 self.ir.walk(
 File "/sonic/src/dash-sai/DASH/dash-pipeline/SAI/utils/p4ir/p4ir_tree.py", line 18, in walk
 on_match(match)
 File "/sonic/src/dash-sai/DASH/dash-pipeline/SAI/utils/p4ir/p4ir_var_ref_graph.py", line 24, in on_counter_definition
 ir_value = P4IRVarInfo.from_ir(match.value)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/sonic/src/dash-sai/DASH/dash-pipeline/SAI/utils/p4ir/p4ir_var_info.py", line 11, in from_ir
 ir_def_node["Source_Info"]["source_fragment"],
 ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
TypeError: list indices must be integers or slices, not str
```
In the version 1.8.0, dict is flattened to a list, which causes the above TypeError
With this change, jsonpath_ng is pinned to exclude 1.8.0 release
##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it

#### How to verify it

<!--
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
- [ ] 202511

#### Tested branch (Please provide the tested image version)

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

- [ ] <!-- image version 1 -->
- [ ] <!-- 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 <sonicbld@microsoft.com>

#### A picture of a cute animal (not mandatory but encouraged)
…6906)

## Why I did it
Add MMU/QoS configuration support for disaggregated Regional Hub device types (LowerRegionalHub, FabricRegionalHub, UpperRegionalHub) and update Nexthop platform buffer defaults. Remove unused switch_subrole variable from buffers_config.j2.

## How I did it

### buffers_config.j2 (build template)
- Added fabricregionalhub to lt2 filename postfix mapping for buffer defaults selection
- Removed unused switch_subrole variable (no longer referenced after lowerspine subtype removal)
- Added cable length entries to ports2cable dictionary:
 - fabricregionalhub_lowerregionalhub: 5m
 - lowerregionalhub_upperregionalhub: 50m
 - lowerregionalhub_upperspinerouter: 120000m
 - lowerregionalhub_spinerouter: 120000m
 - upperregionalhub_regionalwanaggregator: 50m

### Arista-7060X6-64PE-B-O128 platform
- buffers.json.j2: Added fabricregionalhub to LT2 topology selection (uses buffers_defaults_lt2.j2)
- qos.json.j2: Skip custom QoS maps for fabricregionalhub (same behavior as LowerSpineRouter)
- sai.profile.j2: Use LT2 BCM config (th5-a7060x6-64pe-lt2.config.bcm) for fabricregionalhub

### Nexthop NH-5010-F-O64 platform
- Updated buffers_defaults_t2.j2 (both default and BALANCED profiles) with Regional Hub cable length entries
- Fixed quoting error for upperregionalhub_regionalwanaggregator value

### Tests
- Added test_buffers_frh_render_template: FabricRegionalHub on Arista-7060X6-64PE-B-O128 with LowerRegionalHub neighbors (all 5m cable)
- Added test_buffers_urh_render_template: UpperRegionalHub on NH-5010-F-O64 with 42 LowerRegionalHub (50m) + 21 RegionalWanAggregator (50m) neighbors
- Added test_buffers_lrh_render_template: LowerRegionalHub on NH-5010-F-O64 with 32 FabricRegionalHub (5m) + 31 UpperRegionalHub (50m) neighbors

## How to verify it
- Run config-engine tests:
 - pytest src/sonic-config-engine/tests/test_j2files.py::TestJ2Files::test_buffers_frh_render_template -v
 - pytest src/sonic-config-engine/tests/test_j2files.py::TestJ2Files::test_buffers_urh_render_template -v
 - pytest src/sonic-config-engine/tests/test_j2files.py::TestJ2Files::test_buffers_lrh_render_template -v
- Verify cable lengths resolve correctly for all Regional Hub neighbor relationships

## Description for the changelog
Add MMU/QoS config support for Regional Hub device types (LowerRegionalHub, FabricRegionalHub, UpperRegionalHub). Add cable length mappings, update Arista-7060X6-64PE-B-O128 and Nexthop NH-5010-F-O64 platforms. Add buffer rendering tests for all three Regional Hub roles.

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mssonicbld mssonicbld merged commit a9709a3 into Azure:202603 Apr 22, 2026
5 checks passed
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