-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mellanox] Calculate the buffer size based on the latest excel and wi…
…th gearbox considered (#4239)
- Loading branch information
Showing
6 changed files
with
234 additions
and
6 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t0.j2
This file was deleted.
Oops, something went wrong.
104 changes: 104 additions & 0 deletions
104
device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t0.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,104 @@ | ||
{% set default_cable = '5m' %} | ||
{% set ingress_lossless_pool_size = '28196784' %} | ||
{% set ingress_lossy_pool_size = '28196784' %} | ||
{% set egress_lossless_pool_size = '34340832' %} | ||
{% set egress_lossy_pool_size = '28196784' %} | ||
|
||
{%- macro generate_port_lists(PORT_ALL) %} | ||
{# Generate list of ports #} | ||
{%- for port_idx in range(0, 32) %} | ||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %} | ||
{%- endfor %} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_buffer_pool_and_profiles() %} | ||
"BUFFER_POOL": { | ||
"ingress_lossless_pool": { | ||
"size": "{{ ingress_lossless_pool_size }}", | ||
"type": "ingress", | ||
"mode": "dynamic" | ||
}, | ||
"ingress_lossy_pool": { | ||
"size": "{{ ingress_lossy_pool_size }}", | ||
"type": "ingress", | ||
"mode": "dynamic" | ||
}, | ||
"egress_lossless_pool": { | ||
"size": "{{ egress_lossless_pool_size }}", | ||
"type": "egress", | ||
"mode": "dynamic" | ||
}, | ||
"egress_lossy_pool": { | ||
"size": "{{ egress_lossy_pool_size }}", | ||
"type": "egress", | ||
"mode": "dynamic" | ||
} | ||
}, | ||
"BUFFER_PROFILE": { | ||
"ingress_lossless_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossless_pool]", | ||
"size":"0", | ||
"dynamic_th":"0" | ||
}, | ||
"ingress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossy_pool]", | ||
"size":"0", | ||
"dynamic_th":"3" | ||
}, | ||
"egress_lossless_profile": { | ||
"pool":"[BUFFER_POOL|egress_lossless_pool]", | ||
"size":"0", | ||
"dynamic_th":"7" | ||
}, | ||
"egress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|egress_lossy_pool]", | ||
"size":"4096", | ||
"dynamic_th":"3" | ||
}, | ||
"q_lossy_profile": { | ||
"pool":"[BUFFER_POOL|egress_lossy_pool]", | ||
"size":"0", | ||
"dynamic_th":"3" | ||
} | ||
}, | ||
{%- endmacro %} | ||
|
||
{%- macro generate_profile_lists(port_names) %} | ||
"BUFFER_PORT_INGRESS_PROFILE_LIST": { | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}": { | ||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% endfor %} | ||
}, | ||
"BUFFER_PORT_EGRESS_PROFILE_LIST": { | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}": { | ||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% endfor %} | ||
} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_queue_buffers(port_names) %} | ||
"BUFFER_QUEUE": { | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}|3-4": { | ||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]" | ||
}, | ||
{% endfor %} | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}|0-2": { | ||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]" | ||
}, | ||
{% endfor %} | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}|5-6": { | ||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% endfor %} | ||
} | ||
{%- endmacro %} |
1 change: 0 additions & 1 deletion
1
device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t1.j2
This file was deleted.
Oops, something went wrong.
104 changes: 104 additions & 0 deletions
104
device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t1.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,104 @@ | ||
{% set default_cable = '5m' %} | ||
{% set ingress_lossless_pool_size = '17891280' %} | ||
{% set ingress_lossy_pool_size = '17891280' %} | ||
{% set egress_lossless_pool_size = '34340832' %} | ||
{% set egress_lossy_pool_size = '17891280' %} | ||
|
||
{%- macro generate_port_lists(PORT_ALL) %} | ||
{# Generate list of ports #} | ||
{%- for port_idx in range(0, 32) %} | ||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %} | ||
{%- endfor %} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_buffer_pool_and_profiles() %} | ||
"BUFFER_POOL": { | ||
"ingress_lossless_pool": { | ||
"size": "{{ ingress_lossless_pool_size }}", | ||
"type": "ingress", | ||
"mode": "dynamic" | ||
}, | ||
"ingress_lossy_pool": { | ||
"size": "{{ ingress_lossy_pool_size }}", | ||
"type": "ingress", | ||
"mode": "dynamic" | ||
}, | ||
"egress_lossless_pool": { | ||
"size": "{{ egress_lossless_pool_size }}", | ||
"type": "egress", | ||
"mode": "dynamic" | ||
}, | ||
"egress_lossy_pool": { | ||
"size": "{{ egress_lossy_pool_size }}", | ||
"type": "egress", | ||
"mode": "dynamic" | ||
} | ||
}, | ||
"BUFFER_PROFILE": { | ||
"ingress_lossless_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossless_pool]", | ||
"size":"0", | ||
"dynamic_th":"0" | ||
}, | ||
"ingress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossy_pool]", | ||
"size":"0", | ||
"dynamic_th":"3" | ||
}, | ||
"egress_lossless_profile": { | ||
"pool":"[BUFFER_POOL|egress_lossless_pool]", | ||
"size":"0", | ||
"dynamic_th":"7" | ||
}, | ||
"egress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|egress_lossy_pool]", | ||
"size":"4096", | ||
"dynamic_th":"3" | ||
}, | ||
"q_lossy_profile": { | ||
"pool":"[BUFFER_POOL|egress_lossy_pool]", | ||
"size":"0", | ||
"dynamic_th":"3" | ||
} | ||
}, | ||
{%- endmacro %} | ||
|
||
{%- macro generate_profile_lists(port_names) %} | ||
"BUFFER_PORT_INGRESS_PROFILE_LIST": { | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}": { | ||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% endfor %} | ||
}, | ||
"BUFFER_PORT_EGRESS_PROFILE_LIST": { | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}": { | ||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% endfor %} | ||
} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_queue_buffers(port_names) %} | ||
"BUFFER_QUEUE": { | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}|3-4": { | ||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]" | ||
}, | ||
{% endfor %} | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}|0-2": { | ||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]" | ||
}, | ||
{% endfor %} | ||
{% for port in port_names.split(',') %} | ||
"{{ port }}|5-6": { | ||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]" | ||
}{% if not loop.last %},{% endif %} | ||
|
||
{% endfor %} | ||
} | ||
{%- endmacro %} |
1 change: 0 additions & 1 deletion
1
device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/pg_profile_lookup.ini
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/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,23 @@ | ||
# PG lossless profiles. | ||
# speed cable size xon xoff threshold | ||
1000 5m 32768 18432 14336 0 | ||
10000 5m 34816 18432 16384 0 | ||
25000 5m 38912 18432 20480 0 | ||
40000 5m 41984 18432 23552 0 | ||
50000 5m 44032 18432 25600 0 | ||
100000 5m 55296 18432 36864 0 | ||
200000 5m 77824 18432 59392 0 | ||
1000 40m 33792 18432 15360 0 | ||
10000 40m 36864 18432 18432 0 | ||
25000 40m 43008 18432 24576 0 | ||
40000 40m 49152 18432 30720 0 | ||
50000 40m 53248 18432 34816 0 | ||
100000 40m 72704 18432 54272 0 | ||
200000 40m 112640 18432 94208 0 | ||
1000 300m 34816 18432 16384 0 | ||
10000 300m 50176 18432 31744 0 | ||
25000 300m 75776 18432 57344 0 | ||
40000 300m 101376 18432 82944 0 | ||
50000 300m 117760 18432 99328 0 | ||
100000 300m 202752 18432 184320 0 | ||
200000 300m 373760 18432 355328 0 |
2 changes: 1 addition & 1 deletion
2
device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.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 |
---|---|---|
@@ -1 +1 @@ | ||
../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t0.j2 | ||
../ACS-MSN3800/buffers_defaults_t0.j2 |
2 changes: 1 addition & 1 deletion
2
device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.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 |
---|---|---|
@@ -1 +1 @@ | ||
../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t1.j2 | ||
../ACS-MSN3800/buffers_defaults_t1.j2 |
2 changes: 1 addition & 1 deletion
2
device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/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 |
---|---|---|
@@ -1 +1 @@ | ||
../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/pg_profile_lookup.ini | ||
../ACS-MSN3800/pg_profile_lookup.ini |