Skip to content
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
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
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 Mar 26, 2018
bd14591
Add a new supported device accton as7116
simonJi2018 Mar 28, 2018
199777f
Add maintainer info for deb
simonJi2018 Mar 29, 2018
50bba03
Add mk file for accton 7116
simonJi2018 Apr 8, 2018
72d9dfd
Merge pull request #1 from Azure/master
simonJi2018 Apr 8, 2018
2454618
Merge pull request #2 from Azure/master
simonJi2018 Apr 10, 2018
8a11490
Merge remote-tracking branch 'upstream/master'
simonJi2018 Apr 25, 2018
8dc7136
fix some bug for sai 1.2.4
simonJi2018 Apr 25, 2018
7175397
fix git commit error for sdk and sai
simonJi2018 Apr 25, 2018
72e9dcf
change sai and sdk deb name
simonJi2018 Apr 25, 2018
8ec29b7
add config file for qos support
simonJi2018 Apr 26, 2018
9cebb42
add config file for qos support
simonJi2018 May 11, 2018
10b5338
Merge remote-tracking branch 'upstream/master'
simonJi2018 May 15, 2018
51f508c
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
simonJi2018 Jun 7, 2018
45d8da9
Merge branch 'Azure-master'
simonJi2018 Jun 7, 2018
db18dd3
initial commit
simonJi2018 Jun 7, 2018
f455b17
Delete qos.json
simonJi2018 Jul 19, 2018
19c37c8
Delete buffers.json.j2
simonJi2018 Jul 19, 2018
cbb7390
Delete qos.json
simonJi2018 Jul 19, 2018
dae8ffb
Delete buffers.json.j2
simonJi2018 Jul 19, 2018
cd7ceee
Delete buffers.json.j2
simonJi2018 Jul 19, 2018
3e70ee9
Delete qos.json
simonJi2018 Jul 19, 2018
ab58fd5
Merge pull request #4 from Azure/master
simonJi2018 Jul 19, 2018
f0d4e82
Merge branch 'master' of https://github.com/simonJi2018/sonic-buildimage
simonJi2018 Jul 19, 2018
927e56e
Merge remote-tracking branch 'upstream/master'
simonJi2018 Jul 20, 2018
a8728f2
add support for sai 1.3.0
simonJi2018 Jul 23, 2018
aa9ce44
Merge remote-tracking branch 'upstream/master'
simonJi2018 Jul 25, 2018
5568712
add qos and buffer file for device and add sensor driver for 7116
simonJi2018 Jul 25, 2018
5b857fa
Merge pull request #6 from Azure/master
simonJi2018 Jul 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) -%}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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

{%- 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": {
}
}

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
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@ Ethernet44 76 Ethernet45/1 44
Ethernet45 77 Ethernet46/1 45
Ethernet46 78 Ethernet47/1 46
Ethernet47 79 Ethernet48/1 47
Ethernet48 80 Ethernet49/1 48
Ethernet49 81 Ethernet50/1 49
Ethernet50 82 Ethernet51/1 50
Ethernet51 83 Ethernet52/1 51
Ethernet52 84,85,86,87 Ethernet53/1 52
Ethernet53 104,105,106,107 Ethernet54/1 53
Ethernet54 108,109,110,111 Ethernet55/1 54
Ethernet55 112,113,114,115 Ethernet56/1 55
Ethernet56 116,117,118,119 Ethernet57/1 56
Ethernet48 84,85,86,87 Ethernet49/1 48
Ethernet49 80,81,82,83 Ethernet50/1 49
Ethernet50 104,105,106,107 Ethernet51/1 50
Ethernet51 108,109,110,111 Ethernet52/1 51
Ethernet52 112,113,114,115 Ethernet53/1 52
Ethernet53 116,117,118,119 Ethernet54/1 53
Loading