forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support single ingress pool for MSFT SKUs and optimize headroom calcu…
…lation This is to backport the sonic-net#4886 to 201911 Calculate pool size in t1 as 24 * downlink port + 8 * uplink port - Take both port and peer MTU into account when calculating headroom - Worst case factor is decreased to 50% - Mellanox-SN2700-C28D8 t0, assume 48 * 50G/5m + 8 * 100G/40m ports - Mellanox-SN2700 (C32) - t0: 16 * 100G/5m + 16 * 100G/40m - t1: 16 * 100G/40m + 16 * 100G/300m Signed-off-by: Stephen Sun <stephens@nvidia.com>
- Loading branch information
Showing
33 changed files
with
653 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-C28D8/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 @@ | ||
../ACS-MSN2700/buffers_defaults_t0.j2 | ||
../Mellanox-SN2700-D48C8/buffers_defaults_t0.j2 |
2 changes: 1 addition & 1 deletion
2
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-C28D8/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 @@ | ||
../ACS-MSN2700/buffers_defaults_t1.j2 | ||
../Mellanox-SN2700-D48C8/buffers_defaults_t1.j2 |
2 changes: 1 addition & 1 deletion
2
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-C28D8/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 @@ | ||
../ACS-MSN2700/pg_profile_lookup.ini | ||
../Mellanox-SN2700-D48C8/pg_profile_lookup.ini |
1 change: 0 additions & 1 deletion
1
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t0.j2
This file was deleted.
Oops, something went wrong.
100 changes: 100 additions & 0 deletions
100
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/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,100 @@ | ||
{% set default_cable = '5m' %} | ||
{% set ingress_lossless_pool_size = '6687744' %} | ||
{% set egress_lossless_pool_size = '13945824' %} | ||
{% set egress_lossy_pool_size = '6687744' %} | ||
|
||
{%- 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" | ||
}, | ||
"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":"7" | ||
}, | ||
"ingress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossless_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":"9216", | ||
"dynamic_th":"7" | ||
}, | ||
"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]" | ||
}{% 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_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t1.j2
This file was deleted.
Oops, something went wrong.
100 changes: 100 additions & 0 deletions
100
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/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,100 @@ | ||
{% set default_cable = '5m' %} | ||
{% set ingress_lossless_pool_size = '8506368' %} | ||
{% set egress_lossless_pool_size = '13945824' %} | ||
{% set egress_lossy_pool_size = '8506368' %} | ||
|
||
{%- 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" | ||
}, | ||
"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":"7" | ||
}, | ||
"ingress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossless_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":"9216", | ||
"dynamic_th":"7" | ||
}, | ||
"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]" | ||
}{% 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_msn2700-r0/Mellanox-SN2700-D48C8/pg_profile_lookup.ini
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/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 41984 19456 22528 0 | ||
25000 5m 41984 19456 22528 0 | ||
40000 5m 41984 19456 22528 0 | ||
50000 5m 41984 19456 22528 0 | ||
100000 5m 43008 19456 23552 0 | ||
10000 40m 41984 19456 22528 0 | ||
25000 40m 44032 19456 24576 0 | ||
40000 40m 45056 19456 25600 0 | ||
50000 40m 45056 19456 25600 0 | ||
100000 40m 49152 19456 29696 0 | ||
10000 300m 47104 19456 27648 0 | ||
25000 300m 56320 19456 36864 0 | ||
40000 300m 64512 19456 45056 0 | ||
50000 300m 69632 19456 50176 0 | ||
100000 300m 98304 19456 78848 0 |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/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 @@ | ||
../ACS-MSN2700/buffers.json.j2 |
100 changes: 100 additions & 0 deletions
100
device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/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,100 @@ | ||
{% set default_cable = '5m' %} | ||
{% set ingress_lossless_pool_size = '9489408' %} | ||
{% set egress_lossless_pool_size = '13945824' %} | ||
{% set egress_lossy_pool_size = '9489408' %} | ||
|
||
{%- 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" | ||
}, | ||
"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":"7" | ||
}, | ||
"ingress_lossy_profile": { | ||
"pool":"[BUFFER_POOL|ingress_lossless_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":"9216", | ||
"dynamic_th":"7" | ||
}, | ||
"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]" | ||
}{% 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 %} | ||
|
||
|
Oops, something went wrong.