-
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
+ Modified buffer config template to include internal ASIC with 5m ca… #4959
Conversation
recreated this PR to resolve merge conflicts. Addressed comments as mentioned in #4929 |
@smaheshm, the sonic-config-engine tests are failing. Please check |
retest mellanox please |
retest broadcom please |
retest mellanox please |
@arlakshm @neethajohn Let me know if I should add any other reviewer. |
@@ -57,7 +57,9 @@ def sort_by_port_index(value): | |||
if not value: | |||
return | |||
if isinstance(value, list): | |||
value.sort(key = lambda k: int(k[8:])) | |||
value.sort( | |||
key = lambda k: int(k[8:]) if "BP" not in k else int(k[11:]) + 1024 |
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 difficult to understand the logic here, for example, what does BP mean? what is 1024? why 1024?
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.
Backend ethernet ports are identified as 'Ethernet-BPxy'. The change extracts the port number for the backend ports. '1024' is just to sort the back end ports after the front end ports, assuming number of front end ports will be < 1024.
'+ 1024' has no functional impact other than for cleaner look in config_db. All backend ports are grouped at the end. This can be removed if that is preferred.
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.
Can you add a comment above this sort for future reference?
{%- set roles1 = roles1 | lower %} | ||
{%- set roles2 = roles2 | lower %} | ||
{%- if 'asic' == neighbor_role | lower %} | ||
{%- set roles1 = 'internal' %} |
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 unit test to cover this change in sonic-config-engine?
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.
Added unit test.
…latforms. All links that include backend ports must be of role 'internal'.
retest broadcom please |
@@ -57,7 +57,9 @@ def sort_by_port_index(value): | |||
if not value: | |||
return | |||
if isinstance(value, list): | |||
value.sort(key = lambda k: int(k[8:])) | |||
value.sort( | |||
key = lambda k: int(k[8:]) if "BP" not in k else int(k[11:]) + 1024 |
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.
Can you add a comment above this sort for future reference?
retest vsimage please |
#4959) + Modified buffer config template to include internal ASIC with 5m cable length + added unit test to verify the changes.
@smaheshm Please create PR for 201911 |
- Why I did it
To support buffer config generation for multi ASIC platform. The cable length used to select buffer profile is determined by the role of local and peer switch. In case of multi ASIC platforms cable length needs to determined between ASICs.
- How I did it
Added a new role called "internal" with a cable length of "5m". The role becomes "internal" if one of the ASICs in the pair is defined as 'internal' in minigraph.
- How to verify it
Verified config generation on multi-ASIC and single ASIC platforms. Sent traffic with different priorities, verified the queue counters. Visual confirmation of buffer configuration values.
- Description for the changelog
Modified the 'buffers_config' template to generate cable length between internal ASICs.
Modified sort API to account for internal interfaces that are named as "Ethernet-BPx".
- A picture of a cute animal (not mandatory but encouraged)