Skip to content

Commit 8f0ff4b

Browse files
authored
[Mellanox] Calculate the buffer size based on the latest excel and with gearbox considered (#4239)
1 parent fc91f81 commit 8f0ff4b

File tree

6 files changed

+234
-6
lines changed

6 files changed

+234
-6
lines changed

device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t0.j2

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{% set default_cable = '5m' %}
2+
{% set ingress_lossless_pool_size = '28196784' %}
3+
{% set ingress_lossy_pool_size = '28196784' %}
4+
{% set egress_lossless_pool_size = '34340832' %}
5+
{% set egress_lossy_pool_size = '28196784' %}
6+
7+
{%- macro generate_port_lists(PORT_ALL) %}
8+
{# Generate list of ports #}
9+
{%- for port_idx in range(0, 32) %}
10+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
11+
{%- endfor %}
12+
{%- endmacro %}
13+
14+
{%- macro generate_buffer_pool_and_profiles() %}
15+
"BUFFER_POOL": {
16+
"ingress_lossless_pool": {
17+
"size": "{{ ingress_lossless_pool_size }}",
18+
"type": "ingress",
19+
"mode": "dynamic"
20+
},
21+
"ingress_lossy_pool": {
22+
"size": "{{ ingress_lossy_pool_size }}",
23+
"type": "ingress",
24+
"mode": "dynamic"
25+
},
26+
"egress_lossless_pool": {
27+
"size": "{{ egress_lossless_pool_size }}",
28+
"type": "egress",
29+
"mode": "dynamic"
30+
},
31+
"egress_lossy_pool": {
32+
"size": "{{ egress_lossy_pool_size }}",
33+
"type": "egress",
34+
"mode": "dynamic"
35+
}
36+
},
37+
"BUFFER_PROFILE": {
38+
"ingress_lossless_profile": {
39+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
40+
"size":"0",
41+
"dynamic_th":"0"
42+
},
43+
"ingress_lossy_profile": {
44+
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
45+
"size":"0",
46+
"dynamic_th":"3"
47+
},
48+
"egress_lossless_profile": {
49+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
50+
"size":"0",
51+
"dynamic_th":"7"
52+
},
53+
"egress_lossy_profile": {
54+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
55+
"size":"4096",
56+
"dynamic_th":"3"
57+
},
58+
"q_lossy_profile": {
59+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
60+
"size":"0",
61+
"dynamic_th":"3"
62+
}
63+
},
64+
{%- endmacro %}
65+
66+
{%- macro generate_profile_lists(port_names) %}
67+
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
68+
{% for port in port_names.split(',') %}
69+
"{{ port }}": {
70+
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
71+
}{% if not loop.last %},{% endif %}
72+
73+
{% endfor %}
74+
},
75+
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
76+
{% for port in port_names.split(',') %}
77+
"{{ port }}": {
78+
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
79+
}{% if not loop.last %},{% endif %}
80+
81+
{% endfor %}
82+
}
83+
{%- endmacro %}
84+
85+
{%- macro generate_queue_buffers(port_names) %}
86+
"BUFFER_QUEUE": {
87+
{% for port in port_names.split(',') %}
88+
"{{ port }}|3-4": {
89+
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
90+
},
91+
{% endfor %}
92+
{% for port in port_names.split(',') %}
93+
"{{ port }}|0-2": {
94+
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
95+
},
96+
{% endfor %}
97+
{% for port in port_names.split(',') %}
98+
"{{ port }}|5-6": {
99+
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
100+
}{% if not loop.last %},{% endif %}
101+
102+
{% endfor %}
103+
}
104+
{%- endmacro %}

device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t1.j2

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{% set default_cable = '5m' %}
2+
{% set ingress_lossless_pool_size = '17891280' %}
3+
{% set ingress_lossy_pool_size = '17891280' %}
4+
{% set egress_lossless_pool_size = '34340832' %}
5+
{% set egress_lossy_pool_size = '17891280' %}
6+
7+
{%- macro generate_port_lists(PORT_ALL) %}
8+
{# Generate list of ports #}
9+
{%- for port_idx in range(0, 32) %}
10+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
11+
{%- endfor %}
12+
{%- endmacro %}
13+
14+
{%- macro generate_buffer_pool_and_profiles() %}
15+
"BUFFER_POOL": {
16+
"ingress_lossless_pool": {
17+
"size": "{{ ingress_lossless_pool_size }}",
18+
"type": "ingress",
19+
"mode": "dynamic"
20+
},
21+
"ingress_lossy_pool": {
22+
"size": "{{ ingress_lossy_pool_size }}",
23+
"type": "ingress",
24+
"mode": "dynamic"
25+
},
26+
"egress_lossless_pool": {
27+
"size": "{{ egress_lossless_pool_size }}",
28+
"type": "egress",
29+
"mode": "dynamic"
30+
},
31+
"egress_lossy_pool": {
32+
"size": "{{ egress_lossy_pool_size }}",
33+
"type": "egress",
34+
"mode": "dynamic"
35+
}
36+
},
37+
"BUFFER_PROFILE": {
38+
"ingress_lossless_profile": {
39+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
40+
"size":"0",
41+
"dynamic_th":"0"
42+
},
43+
"ingress_lossy_profile": {
44+
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
45+
"size":"0",
46+
"dynamic_th":"3"
47+
},
48+
"egress_lossless_profile": {
49+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
50+
"size":"0",
51+
"dynamic_th":"7"
52+
},
53+
"egress_lossy_profile": {
54+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
55+
"size":"4096",
56+
"dynamic_th":"3"
57+
},
58+
"q_lossy_profile": {
59+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
60+
"size":"0",
61+
"dynamic_th":"3"
62+
}
63+
},
64+
{%- endmacro %}
65+
66+
{%- macro generate_profile_lists(port_names) %}
67+
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
68+
{% for port in port_names.split(',') %}
69+
"{{ port }}": {
70+
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
71+
}{% if not loop.last %},{% endif %}
72+
73+
{% endfor %}
74+
},
75+
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
76+
{% for port in port_names.split(',') %}
77+
"{{ port }}": {
78+
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
79+
}{% if not loop.last %},{% endif %}
80+
81+
{% endfor %}
82+
}
83+
{%- endmacro %}
84+
85+
{%- macro generate_queue_buffers(port_names) %}
86+
"BUFFER_QUEUE": {
87+
{% for port in port_names.split(',') %}
88+
"{{ port }}|3-4": {
89+
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
90+
},
91+
{% endfor %}
92+
{% for port in port_names.split(',') %}
93+
"{{ port }}|0-2": {
94+
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
95+
},
96+
{% endfor %}
97+
{% for port in port_names.split(',') %}
98+
"{{ port }}|5-6": {
99+
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
100+
}{% if not loop.last %},{% endif %}
101+
102+
{% endfor %}
103+
}
104+
{%- endmacro %}

device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/pg_profile_lookup.ini

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PG lossless profiles.
2+
# speed cable size xon xoff threshold
3+
1000 5m 32768 18432 14336 0
4+
10000 5m 34816 18432 16384 0
5+
25000 5m 38912 18432 20480 0
6+
40000 5m 41984 18432 23552 0
7+
50000 5m 44032 18432 25600 0
8+
100000 5m 55296 18432 36864 0
9+
200000 5m 77824 18432 59392 0
10+
1000 40m 33792 18432 15360 0
11+
10000 40m 36864 18432 18432 0
12+
25000 40m 43008 18432 24576 0
13+
40000 40m 49152 18432 30720 0
14+
50000 40m 53248 18432 34816 0
15+
100000 40m 72704 18432 54272 0
16+
200000 40m 112640 18432 94208 0
17+
1000 300m 34816 18432 16384 0
18+
10000 300m 50176 18432 31744 0
19+
25000 300m 75776 18432 57344 0
20+
40000 300m 101376 18432 82944 0
21+
50000 300m 117760 18432 99328 0
22+
100000 300m 202752 18432 184320 0
23+
200000 300m 373760 18432 355328 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t0.j2
1+
../ACS-MSN3800/buffers_defaults_t0.j2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t1.j2
1+
../ACS-MSN3800/buffers_defaults_t1.j2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/pg_profile_lookup.ini
1+
../ACS-MSN3800/pg_profile_lookup.ini

0 commit comments

Comments
 (0)