Skip to content

Commit 8ebe13c

Browse files
[Netberg][Innovium] Added support for Aurora 615/715
Signed-off-by: Andrew Sapronov <[email protected]>
1 parent 678100a commit 8ebe13c

File tree

140 files changed

+25348
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+25348
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{# Default values which will be used if no actual configura available #}
2+
{% set default_cable = '40m' %}
3+
4+
{# Port configuration to cable length look-up table #}
5+
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
6+
{# Roles described in the minigraph #}
7+
{% set ports2cable = {
8+
'torrouter_server' : '5m',
9+
'leafrouter_torrouter' : '40m',
10+
'spinerouter_leafrouter' : '300m'
11+
}
12+
%}
13+
14+
{%- macro cable_length(port_name) %}
15+
{%- set cable_len = [] %}
16+
{%- for local_port in DEVICE_NEIGHBOR %}
17+
{%- if local_port == port_name %}
18+
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
19+
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
20+
{%- set neighbor_role = neighbor.type %}
21+
{%- set roles1 = switch_role + '_' + neighbor_role %}
22+
{%- set roles2 = neighbor_role + '_' + switch_role %}
23+
{%- set roles1 = roles1 | lower %}
24+
{%- set roles2 = roles2 | lower %}
25+
{%- if roles1 in ports2cable %}
26+
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
27+
{%- elif roles2 in ports2cable %}
28+
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
29+
{%- endif %}
30+
{%- endif %}
31+
{%- endif %}
32+
{%- endfor %}
33+
{%- if cable_len -%}
34+
{{ cable_len.0 }}
35+
{%- else %}
36+
{%- if switch_role.lower() == 'torrouter' %}
37+
{%- for local_port in VLAN_MEMBER %}
38+
{%- if local_port[1] == port_name %}
39+
{%- set roles3 = switch_role + '_' + 'server' %}
40+
{%- set roles3 = roles3 | lower %}
41+
{%- if roles3 in ports2cable %}
42+
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
43+
{%- endif %}
44+
{%- endif %}
45+
{%- endfor %}
46+
{%- if cable_len -%}
47+
{{ cable_len.0 }}
48+
{%- else -%}
49+
{{ default_cable }}
50+
{%- endif %}
51+
{%- else -%}
52+
{{ default_cable }}
53+
{%- endif %}
54+
{%- endif %}
55+
{%- endmacro %}
56+
57+
{%- if DEVICE_METADATA is defined %}
58+
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
59+
{%- endif -%}
60+
61+
{% set port_names_list = [] %}
62+
{% for port in PORT %}
63+
{%- if port_names_list.append(port) %}{% endif %}
64+
{% endfor %}
65+
{% set port_names = port_names_list | join(',') -%}
66+
67+
{
68+
"CABLE_LENGTH": {
69+
"AZURE": {
70+
{% for port in PORT %}
71+
{% set cable = cable_length(port) -%}
72+
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
73+
74+
{% endfor %}
75+
}
76+
},
77+
"BUFFER_POOL": {
78+
"ingress_lossless_pool": {
79+
"size": "34056960",
80+
"type": "ingress",
81+
"mode": "dynamic",
82+
"xoff": "4185600"
83+
},
84+
"lossy_pool": {
85+
"size": "14595840",
86+
"type": "egress",
87+
"mode": "dynamic",
88+
"xoff": "0"
89+
}
90+
},
91+
"BUFFER_PROFILE": {
92+
"ingress_lossless_profile": {
93+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
94+
"xoff":"38816",
95+
"size":"1518",
96+
"dynamic_th":"1",
97+
"xon_offset":"13440"
98+
},
99+
"egress_lossless_profile": {
100+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
101+
"size":"0",
102+
"static_th":"23001600"
103+
},
104+
"ingress_lossy_profile": {
105+
"pool":"[BUFFER_POOL|lossy_pool]",
106+
"size":"0",
107+
"static_th":"23001600"
108+
},
109+
"egress_lossy_profile": {
110+
"pool":"[BUFFER_POOL|lossy_pool]",
111+
"size":"1518",
112+
"dynamic_th":"2"
113+
}
114+
},
115+
"BUFFER_PG": {
116+
"{{ port_names }}|0-2": {
117+
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
118+
},
119+
"{{ port_names }}|3-4": {
120+
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
121+
},
122+
"{{ port_names }}|5-7": {
123+
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
124+
}
125+
},
126+
"BUFFER_QUEUE": {
127+
"{{ port_names }}|3-4": {
128+
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
129+
},
130+
"{{ port_names }}|0-2": {
131+
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
132+
},
133+
"{{ port_names }}|5-7": {
134+
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
135+
}
136+
}
137+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{% set port_names_list = [] %}
2+
{% for port in PORT %}
3+
{%- if port_names_list.append(port) %}{% endif %}
4+
{% endfor %}
5+
{% set port_names = port_names_list | join(',') -%}
6+
7+
{
8+
"BUFFER_POOL": {
9+
"lossy_pool": {
10+
"size": "46003200",
11+
"type": "egress",
12+
"mode": "dynamic",
13+
"xoff": "0"
14+
}
15+
},
16+
"BUFFER_PROFILE": {
17+
"ingress_lossy_profile": {
18+
"pool":"[BUFFER_POOL|lossy_pool]",
19+
"size":"0",
20+
"static_th":"23001600"
21+
},
22+
"egress_lossy_profile": {
23+
"pool":"[BUFFER_POOL|lossy_pool]",
24+
"size":"1518",
25+
"dynamic_th":"2"
26+
}
27+
},
28+
"BUFFER_PG": {
29+
"{{ port_names }}|0-7": {
30+
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
31+
}
32+
},
33+
"BUFFER_QUEUE": {
34+
"{{ port_names }}|0-7": {
35+
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
36+
}
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{# Default values which will be used if no actual configura available #}
2+
{% set default_cable = '40m' %}
3+
4+
{# Port configuration to cable length look-up table #}
5+
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
6+
{# Roles described in the minigraph #}
7+
{% set ports2cable = {
8+
'torrouter_server' : '5m',
9+
'leafrouter_torrouter' : '40m',
10+
'spinerouter_leafrouter' : '300m'
11+
}
12+
%}
13+
14+
{%- macro cable_length(port_name) %}
15+
{%- set cable_len = [] %}
16+
{%- for local_port in DEVICE_NEIGHBOR %}
17+
{%- if local_port == port_name %}
18+
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
19+
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
20+
{%- set neighbor_role = neighbor.type %}
21+
{%- set roles1 = switch_role + '_' + neighbor_role %}
22+
{%- set roles2 = neighbor_role + '_' + switch_role %}
23+
{%- set roles1 = roles1 | lower %}
24+
{%- set roles2 = roles2 | lower %}
25+
{%- if roles1 in ports2cable %}
26+
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
27+
{%- elif roles2 in ports2cable %}
28+
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
29+
{%- endif %}
30+
{%- endif %}
31+
{%- endif %}
32+
{%- endfor %}
33+
{%- if cable_len -%}
34+
{{ cable_len.0 }}
35+
{%- else %}
36+
{%- if switch_role.lower() == 'torrouter' %}
37+
{%- for local_port in VLAN_MEMBER %}
38+
{%- if local_port[1] == port_name %}
39+
{%- set roles3 = switch_role + '_' + 'server' %}
40+
{%- set roles3 = roles3 | lower %}
41+
{%- if roles3 in ports2cable %}
42+
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
43+
{%- endif %}
44+
{%- endif %}
45+
{%- endfor %}
46+
{%- if cable_len -%}
47+
{{ cable_len.0 }}
48+
{%- else -%}
49+
{{ default_cable }}
50+
{%- endif %}
51+
{%- else -%}
52+
{{ default_cable }}
53+
{%- endif %}
54+
{%- endif %}
55+
{%- endmacro %}
56+
57+
{%- if DEVICE_METADATA is defined %}
58+
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
59+
{%- endif -%}
60+
61+
{% set port_names_list = [] %}
62+
{% for port in PORT %}
63+
{%- if port_names_list.append(port) %}{% endif %}
64+
{% endfor %}
65+
{% set port_names = port_names_list | join(',') -%}
66+
67+
{
68+
"CABLE_LENGTH": {
69+
"AZURE": {
70+
{% for port in PORT %}
71+
{% set cable = cable_length(port) -%}
72+
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
73+
74+
{% endfor %}
75+
}
76+
},
77+
"BUFFER_POOL": {
78+
"ingress_lossless_pool": {
79+
"size": "34056960",
80+
"type": "ingress",
81+
"mode": "dynamic",
82+
"xoff": "4185600"
83+
},
84+
"lossy_pool": {
85+
"size": "14595840",
86+
"type": "egress",
87+
"mode": "dynamic",
88+
"xoff": "0"
89+
}
90+
},
91+
"BUFFER_PROFILE": {
92+
"ingress_lossless_profile": {
93+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
94+
"xoff":"38816",
95+
"size":"1518",
96+
"dynamic_th":"1",
97+
"xon_offset":"13440"
98+
},
99+
"egress_lossless_profile": {
100+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
101+
"size":"0",
102+
"static_th":"23001600"
103+
},
104+
"ingress_lossy_profile": {
105+
"pool":"[BUFFER_POOL|lossy_pool]",
106+
"size":"0",
107+
"static_th":"23001600"
108+
},
109+
"egress_lossy_profile": {
110+
"pool":"[BUFFER_POOL|lossy_pool]",
111+
"size":"1518",
112+
"dynamic_th":"2"
113+
}
114+
},
115+
"BUFFER_PG": {
116+
"{{ port_names }}|0-2": {
117+
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
118+
},
119+
"{{ port_names }}|3-4": {
120+
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
121+
},
122+
"{{ port_names }}|5-7": {
123+
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
124+
}
125+
},
126+
"BUFFER_QUEUE": {
127+
"{{ port_names }}|3-4": {
128+
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
129+
},
130+
"{{ port_names }}|0-2": {
131+
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
132+
},
133+
"{{ port_names }}|5-7": {
134+
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
135+
}
136+
}
137+
}

0 commit comments

Comments
 (0)