-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Buffers configuration update on port speed change #1250
Conversation
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
@yxieca to check? |
{%- endif -%} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
{%- if cable_len -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under what circumstances would there be more than one length in the list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is passed as an argument for buffermgrd
: https://github.com/Azure/sonic-buildimage/pull/1250/files#diff-849a3366595afffe34a13f4a543dca56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <c_andriym@mellanox.com>
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 <c_andriym@mellanox.com>
@liatgrozovik , pending on sonic-net/sonic-swss#417, other PRs are merged. |
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
- fixed support of sonic-to-sonic install Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
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 <abdosi@microsoft.com>
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