Buffers configuration update on port speed change#1250
Buffers configuration update on port speed change#1250yxieca merged 9 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Andriy Moroz <[email protected]>
Signed-off-by: Andriy Moroz <[email protected]>
Signed-off-by: Andriy Moroz <[email protected]>
|
@yxieca to check? |
| {%- endif -%} | ||
| {%- endif -%} | ||
| {%- endfor -%} | ||
| {%- if cable_len -%} |
There was a problem hiding this comment.
I think you need to test if the list is non-empty, but this test seems to be testing if the list has been defined. Which is defined in line 17 above.
There was a problem hiding this comment.
right, thanks. I already implemented this in #1263 need to back-merge to this PR as well
| {%- endif -%} | ||
| {%- endfor -%} | ||
| {%- if cable_len -%} | ||
| {{ cable_len.0 }} |
There was a problem hiding this comment.
Under what circumstances would there be more than one length in the list?
There was a problem hiding this comment.
there should be no more than one value in the list. cable_len.0 is the way to get first (and only) element of the list. All that weird usage of the cable_len list here is the workaround for jinja templates limitation for variables visibility in blocks. Only list or dictionary can be modified in block and maintain that value outside the block.
| {%- set neighbor_role = neighbor.type -%} | ||
| {%- set roles1 = switch_role + '_' + neighbor_role %} | ||
| {%- set roles2 = neighbor_role + '_' + switch_role -%} | ||
| {%- if roles1 in ports2cable -%} |
There was a problem hiding this comment.
Do we have enforcement elsewhere to make sure that the switch_role and neighbor_role's case is as expected?
If we cannot guarantee the case, then we might want to cast the string to upper or lower case, just in case?
Same question for line 27 below.
There was a problem hiding this comment.
no, we don't have case enforcement. Agree, need to convert to common case before the comparison
| 25000 300m 71680 18432 53248 1 | ||
| 40000 300m 94208 18432 75776 1 | ||
| 50000 300m 94208 18432 75776 1 | ||
| 100000 300m 184320 18432 165888 1 |
There was a problem hiding this comment.
I didn't see matching code using this look up table. Who is using it where and how?
There was a problem hiding this comment.
it is passed as an argument for buffermgrd: https://github.com/Azure/sonic-buildimage/pull/1250/files#diff-849a3366595afffe34a13f4a543dca56
yxieca
left a comment
There was a problem hiding this comment.
The change generally looks good to me, with some minor issues inlined. These comments probably would apply to all commits. I didn't copy them to the next 2.
For converting the old buffer.json file to the new template, if possible, can you come up with a converting tool to take the source file and generate a template?
This tool would be really useful for other platforms under work.
Signed-off-by: Andriy Moroz <[email protected]>
|
following a session on that PR, it is agreed that the tool is nice to have and is not blocking the PR to be merged. But a wiki should be provided inorder to indicate how to convert an old configuration file to the new format. This should be done on another PR. @andriymoroz-mlnx let's fix the build issues and move on to merge. |
Conflicts: dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 dockers/docker-orchagent/swssconfig.sh src/sonic-config-engine/tests/sample_output/msn27.32ports.json
Signed-off-by: Andriy Moroz <[email protected]>
|
@liatgrozovik , pending on sonic-net/sonic-swss#417, other PRs are merged. |
Signed-off-by: Andriy Moroz <[email protected]>
Signed-off-by: Andriy Moroz <[email protected]>
- fixed support of sonic-to-sonic install Signed-off-by: Andriy Moroz <[email protected]>
ccb52454a11e6906bb074d888740d279e4a3c8e3 (HEAD -> 201911, origin/201911) [fast-reboot] Fix fast-reboot when NDP entries are present (#1295) d09667b86abb7d3cd31b92bedf6e4d4bdac4937f Multi-ASIC support for show ip(v6) route (201911 branch) (#1283) 28399bfcad2a40f1a85095bc679540531c4e673c [201911-Mellanox] SKU creator Tool (#1163) (#1250) Signed-off-by: Abhishek Dosi <[email protected]>
ce8b1af9d2200c570c102a38e04cbd9659470585 (HEAD -> 201911, origin/201911) const initializer_list is not a constant expression (#1250) acdb03324fc268f5330d2632a02d0856f35fb880 [201911] Add lgtm.yml (#1901) Signed-off-by: Abhishek Dosi <[email protected]>
…AD automatically (sonic-net#1250) #### Why I did it src/sonic-utilities ``` * afa6c14d - (HEAD -> 202412, origin/202412) Skip checking offload flags for static routes/sids in route check and add check_sids (sonic-net#187) (2 days ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
…03 (sonic-net#1264) ```<br>* aab87ce - (HEAD -> 202503) Merge branch '202412' of https://github.com/Azure/sonic-buildimage-msft into 202503 (2025-06-20) [Sonic Automation] * 916490e - (origin/202412) Add support for Arista-7060X6-64PE-B-O128 TH5-512 (sonic-net#1255) (2025-06-19) [Riff] |\ | failure_prs.log skip_prs.log dce9308 - Add support for Arista-7060X6-64PE-B-O128 TH5-512 (2025-06-18) [Rick Robbins] * a745b3f - [submodule][202412] Update submodule sonic-platform-common to the latest HEAD automatically (sonic-net#1257) (2025-06-19) [Riff] |\ | failure_prs.log skip_prs.log cec0de3 - [submodule] Update submodule sonic-platform-common to the latest HEAD automatically (2025-06-19) [Sonic Automation] * e9c4e3f - [submodule][202412] Update submodule sonic-platform-daemons to the latest HEAD automatically (sonic-net#1246) (2025-06-19) [Riff] |\ | failure_prs.log skip_prs.log 858ede0 - [submodule] Update submodule sonic-platform-daemons to the latest HEAD automatically (2025-06-19) [Sonic Automation] * 30cfe37 - [submodule][202412] Update submodule sonic-utilities to the latest HEAD automatically (sonic-net#1250) (2025-06-19) [Riff] * 2e6f69d - [submodule] Update submodule sonic-utilities to the latest HEAD automatically (2025-06-19) [Sonic Automation]<br>```
REVIEW ONLY.
Please do not commit yet.
submodules pointers needs to be updated after related PRs merged
related PRs:
sonic-net/sonic-swss#417
sonic-net/sonic-swss-common#169 (merged)
sonic-net/sonic-utilities#174 (merged)
- What I did
Config files for PG Buffers update on port speed change
- How I did it
See: https://github.com/Azure/SONiC/wiki/Run-Time-Buffers-Configuration-Update-design
- How to verify it
Buffers configuration should exist in Config DB after boot
redis-cli -n 4 keys \* | grep BUFFER