forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add two extra lossless queues for bounced back traffic (sonic-net#10496)
Signed-off-by: bingwang <bingwang@microsoft.com> Why I did it This PR is to add two extra lossless queues for bounced back traffic. HLD sonic-net/SONiC#950 SKUs include Arista-7050CX3-32S-C32 Arista-7050CX3-32S-D48C8 Arista-7260CX3-D108C8 Arista-7260CX3-C64 Arista-7260CX3-Q64 How I did it Update the buffers.json.j2 template and buffers_config.j2 template to generate new BUFFER_QUEUE table. For T1 devices, queue 2 and queue 6 are set as lossless queues on T0 facing ports. For T0 devices, queue 2 and queue 6 are set as lossless queues on T1 facing ports. Queue 7 is added as a new lossy queue as DSCP 48 is mapped to TC 7, and then mapped into Queue 7 How to verify it Verified by UT Verified by coping the new template and generate buffer config with sonic-cfggen
- Loading branch information
1 parent
fa737d3
commit e7a0da4
Showing
20 changed files
with
4,124 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
1 change: 1 addition & 0 deletions
1
device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_extra_queues.j2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../Arista-7050CX3-32S-D48C8/buffers_extra_queues.j2 |
This file contains 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
37 changes: 37 additions & 0 deletions
37
device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers_extra_queues.j2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% if DEVICE_METADATA is defined and 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %} | ||
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %} | ||
"BUFFER_QUEUE": { | ||
{% for port in port_names.split(',') %} | ||
{% if port in port_names_require_extra_buffer.split(',') %} | ||
"{{ port }}|0-1": { | ||
"profile" : "egress_lossy_profile" | ||
}, | ||
"{{ port }}|2-4": { | ||
"profile" : "egress_lossless_profile" | ||
}, | ||
"{{ port }}|5": { | ||
"profile" : "egress_lossy_profile" | ||
}, | ||
"{{ port }}|6": { | ||
"profile" : "egress_lossless_profile" | ||
}, | ||
"{{ port }}|7": { | ||
"profile" : "egress_lossy_profile" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% else %} | ||
"{{ port }}|0-2": { | ||
"profile" : "egress_lossy_profile" | ||
}, | ||
"{{ port }}|3-4": { | ||
"profile" : "egress_lossless_profile" | ||
}, | ||
"{{ port }}|5-7": { | ||
"profile" : "egress_lossy_profile" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% endif %} | ||
{% endfor %} | ||
} | ||
{% endmacro %} | ||
{% endif %} |
This file contains 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
This file contains 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
38 changes: 38 additions & 0 deletions
38
device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_queues.j2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% if DEVICE_METADATA is defined and 'type' in DEVICE_METADATA['localhost'] and | ||
(DEVICE_METADATA['localhost']['type'] == 'LeafRouter' or DEVICE_METADATA['localhost']['subtype'] == 'DualToR') %} | ||
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %} | ||
"BUFFER_QUEUE": { | ||
{% for port in port_names.split(',') %} | ||
{% if port in port_names_require_extra_buffer.split(',') %} | ||
"{{ port }}|0-1": { | ||
"profile" : "egress_lossy_profile" | ||
}, | ||
"{{ port }}|2-4": { | ||
"profile" : "egress_lossless_profile" | ||
}, | ||
"{{ port }}|5": { | ||
"profile" : "egress_lossy_profile" | ||
}, | ||
"{{ port }}|6": { | ||
"profile" : "egress_lossless_profile" | ||
}, | ||
"{{ port }}|7": { | ||
"profile" : "egress_lossy_profile" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% else %} | ||
"{{ port }}|0-2": { | ||
"profile" : "egress_lossy_profile" | ||
}, | ||
"{{ port }}|3-4": { | ||
"profile" : "egress_lossless_profile" | ||
}, | ||
"{{ port }}|5-7": { | ||
"profile" : "egress_lossy_profile" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% endif %} | ||
{% endfor %} | ||
} | ||
{% endmacro %} | ||
{% endif %} |
This file contains 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
1 change: 1 addition & 0 deletions
1
device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_extra_queues.j2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../Arista-7260CX3-C64/buffers_extra_queues.j2 |
This file contains 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
This file contains 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
1 change: 1 addition & 0 deletions
1
device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_queues.j2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../Arista-7260CX3-C64/buffers_extra_queues.j2 |
This file contains 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
Oops, something went wrong.