-
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
upgrade qos and buffer .json.j2 file and fix some device driver bug #1888
Closed
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
fb89696
Upgrade SAI to v1.2.4
simonJi2018 bd14591
Add a new supported device accton as7116
simonJi2018 199777f
Add maintainer info for deb
simonJi2018 50bba03
Add mk file for accton 7116
simonJi2018 72d9dfd
Merge pull request #1 from Azure/master
simonJi2018 2454618
Merge pull request #2 from Azure/master
simonJi2018 8a11490
Merge remote-tracking branch 'upstream/master'
simonJi2018 8dc7136
fix some bug for sai 1.2.4
simonJi2018 7175397
fix git commit error for sdk and sai
simonJi2018 72e9dcf
change sai and sdk deb name
simonJi2018 8ec29b7
add config file for qos support
simonJi2018 9cebb42
add config file for qos support
simonJi2018 10b5338
Merge remote-tracking branch 'upstream/master'
simonJi2018 51f508c
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
simonJi2018 45d8da9
Merge branch 'Azure-master'
simonJi2018 db18dd3
initial commit
simonJi2018 f455b17
Delete qos.json
simonJi2018 19c37c8
Delete buffers.json.j2
simonJi2018 cbb7390
Delete qos.json
simonJi2018 dae8ffb
Delete buffers.json.j2
simonJi2018 cd7ceee
Delete buffers.json.j2
simonJi2018 3e70ee9
Delete qos.json
simonJi2018 ab58fd5
Merge pull request #4 from Azure/master
simonJi2018 f0d4e82
Merge branch 'master' of https://github.com/simonJi2018/sonic-buildimage
simonJi2018 927e56e
Merge remote-tracking branch 'upstream/master'
simonJi2018 a8728f2
add support for sai 1.3.0
simonJi2018 aa9ce44
Merge remote-tracking branch 'upstream/master'
simonJi2018 5568712
add qos and buffer file for device and add sensor driver for 7116
simonJi2018 5b857fa
Merge pull request #6 from Azure/master
simonJi2018 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
111 changes: 111 additions & 0 deletions
111
device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/buffers.json.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,111 @@ | ||
{# Default values which will be used if no actual configura available #} | ||
{% set default_cable = '40m' %} | ||
{% set default_speed = '10G' %} | ||
{% set default_ports_num = 54 -%} | ||
|
||
{# Port configuration to cable length look-up table #} | ||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} | ||
{# Roles described in the minigraph #} | ||
{% set ports2cable = { | ||
'torrouter_server' : '5m', | ||
'leafrouter_torrouter' : '40m', | ||
'spinerouter_leafrouter' : '300m' | ||
} | ||
%} | ||
|
||
{%- macro cable_length(port_name) -%} | ||
{%- set cable_len = [] -%} | ||
{%- for local_port in DEVICE_NEIGHBOR -%} | ||
{%- if local_port == port_name -%} | ||
{%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} | ||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} | ||
{%- set neighbor_role = neighbor.type -%} | ||
{%- set roles1 = switch_role + '_' + neighbor_role %} | ||
{%- set roles2 = neighbor_role + '_' + switch_role -%} | ||
{%- set roles1 = roles1 | lower -%} | ||
{%- set roles2 = roles2 | lower -%} | ||
{%- if roles1 in ports2cable -%} | ||
{%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} | ||
{%- elif roles2 in ports2cable -%} | ||
{%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} | ||
{%- endif -%} | ||
{%- endif -%} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
{%- if cable_len -%} | ||
{{ cable_len.0 }} | ||
{%- else -%} | ||
{{ default_cable }} | ||
{%- endif -%} | ||
{% endmacro %} | ||
|
||
{%- if DEVICE_METADATA is defined %} | ||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} | ||
{%- endif -%} | ||
|
||
{# Generate list of ports if not defined #} | ||
{% if PORT is not defined %} | ||
{% set PORT = [] %} | ||
{% for port_idx in range(0,default_ports_num) %} | ||
{% if PORT.append("Ethernet%d" % (port_idx)) %}{% endif %} | ||
{% endfor %} | ||
{% endif -%} | ||
|
||
{% set port_names_list = [] %} | ||
{% for port in PORT %} | ||
{%- if port_names_list.append(port) %}{% endif %} | ||
{% endfor %} | ||
{% set port_names = port_names_list | join(',') -%} | ||
|
||
{ | ||
"CABLE_LENGTH": { | ||
"AZURE": { | ||
{% for port in PORT %} | ||
{% set cable = cable_length(port) -%} | ||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} | ||
|
||
{% endfor %} | ||
} | ||
}, | ||
"BUFFER_POOL": { | ||
"ingress_lossless_pool": { | ||
"size": "20971328", | ||
"type": "ingress", | ||
"mode": "static" | ||
}, | ||
"ingress_lossy_pool": { | ||
"size": "20971328", | ||
"type": "ingress", | ||
"mode": "static" | ||
}, | ||
"egress_lossy_pool": { | ||
"size": "20971328", | ||
"type": "egress", | ||
"mode": "static" | ||
} | ||
}, | ||
"BUFFER_PROFILE": { | ||
"ingress_lossless_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossless_pool]", | ||
"xon":"78400", | ||
"xoff":"132160", | ||
"size":"3584", | ||
"static_th":"82880" | ||
}, | ||
"ingress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossy_pool]", | ||
"size":"3584", | ||
"dynamic_th":"-1" | ||
}, | ||
"egress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|egress_lossy_pool]", | ||
"size":"3584", | ||
"dynamic_th":"-4" | ||
} | ||
}, | ||
"BUFFER_PG": { | ||
}, | ||
"BUFFER_QUEUE": { | ||
} | ||
} | ||
|
17 changes: 17 additions & 0 deletions
17
device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/pg_profile_lookup.ini
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,17 @@ | ||
# PG lossless profiles. | ||
# speed cable size xon xoff threshold | ||
10000 5m 3584 32256 59136 36736 | ||
25000 5m 3584 41216 68096 45696 | ||
40000 5m 3584 47488 74368 51968 | ||
50000 5m 3584 52864 79744 57344 | ||
100000 5m 3584 78400 132160 82880 | ||
10000 40m 3584 32256 59136 36736 | ||
25000 40m 3584 41216 68096 45696 | ||
40000 40m 3584 47488 74368 51968 | ||
50000 40m 3584 52864 79744 57344 | ||
100000 40m 3584 78400 132160 82880 | ||
10000 300m 3584 32256 65856 36736 | ||
25000 300m 3584 41216 84672 45696 | ||
40000 300m 3584 47488 101024 51968 | ||
50000 300m 3584 52864 113120 57344 | ||
100000 300m 3584 78400 198688 82880 |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
THis function looks familiar in buffer_config.j2. Can we leverage that template?
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.
Some customer don't want to binding the default buffer config ,so we leave it null let customer to config it by himself.
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.
but you can still import the template and call the functions there if it is the same?
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 understand what your mean, thanks , we change it