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

[Dynamic buffer calculation] Support dynamic buffer calculation #40

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 9 additions & 1 deletion build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ elif [ "$IMAGE_TYPE" = "aboot" ]; then
if [ "$SONIC_ENABLE_IMAGE_SIGNATURE" = "y" ]; then
TARGET_CA_CERT="$TARGET_PATH/ca.cert"
rm -f "$TARGET_CA_CERT"
[ -f "$CA_CERT" ] && cp "$CA_CERT" "$TARGET_CA_CERT"

# If the ca certificate does not exist, the test certificate will be used to sign the image
if [ ! -f "$CA_CERT" ]; then
TEST_CERT_PATH=files/image_config/secureboot/test-certs
CA_CERT="${TEST_CERT_PATH}/ca.cert"
SIGNING_KEY="${TEST_CERT_PATH}/signing.key"
SIGNING_CERT="${TEST_CERT_PATH}/signing.cert"
fi
cp "$CA_CERT" "$TARGET_CA_CERT"
./scripts/sign_image.sh -i "$OUTPUT_ABOOT_IMAGE" -k "$SIGNING_KEY" -c "$SIGNING_CERT" -a "$TARGET_CA_CERT"
fi
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '5029836' %}
{% set ingress_lossy_pool_size = '5029836' %}
{% set egress_lossless_pool_size = '14024599' %}
{% set egress_lossy_pool_size = '5029836' %}
{% set egress_lossless_pool_size = '14024640' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
Expand All @@ -14,12 +11,10 @@
{%- 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"
},
Expand All @@ -29,7 +24,6 @@
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
Expand All @@ -38,7 +32,7 @@
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
Expand All @@ -52,8 +46,8 @@
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '2097100' %}
{% set ingress_lossy_pool_size = '2097100' %}
{% set egress_lossless_pool_size = '14024599' %}
{% set egress_lossy_pool_size = '2097100' %}
{% set egress_lossless_pool_size = '14024640' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
Expand All @@ -14,12 +11,10 @@
{%- 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"
},
Expand All @@ -29,7 +24,6 @@
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
Expand All @@ -38,7 +32,7 @@
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
Expand All @@ -52,8 +46,8 @@
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '14983147' %}
{% set ingress_lossy_pool_size = '14983147' %}
{% set egress_lossless_pool_size = '34340822' %}
{% set egress_lossy_pool_size = '14983147' %}
{% set egress_lossless_pool_size = '34340832' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
Expand All @@ -14,12 +11,10 @@
{%- 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"
},
Expand All @@ -29,7 +24,6 @@
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
Expand All @@ -38,7 +32,7 @@
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
Expand All @@ -52,8 +46,8 @@
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '9158635' %}
{% set ingress_lossy_pool_size = '9158635' %}
{% set egress_lossless_pool_size = '34340822' %}
{% set egress_lossy_pool_size = '9158635' %}
{% set egress_lossless_pool_size = '34340832' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
Expand All @@ -14,12 +11,10 @@
{%- 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"
},
Expand All @@ -29,7 +24,6 @@
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
Expand All @@ -38,7 +32,7 @@
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
Expand All @@ -52,8 +46,8 @@
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% 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 #}
Expand All @@ -14,12 +11,10 @@
{%- 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"
},
Expand All @@ -29,7 +24,6 @@
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
Expand All @@ -38,7 +32,7 @@
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
Expand All @@ -52,8 +46,8 @@
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% 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 #}
Expand All @@ -14,12 +11,10 @@
{%- 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"
},
Expand All @@ -29,7 +24,6 @@
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
Expand All @@ -38,7 +32,7 @@
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
Expand All @@ -52,8 +46,8 @@
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Expand Down
10 changes: 10 additions & 0 deletions device/mellanox/x86_64-mlnx_msn3800-r0/port_peripheral_config.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{%- include 'peripheral_table.j2' %}
,
{
"PORT_PERIPHERAL_TABLE:global": {
"gearbox_model": "MELLANOX-GEARBOX-1"
},
"OP": "SET"
}
]
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '56623104' %}
{% set ingress_lossy_pool_size = '56623104' %}
{% set egress_lossless_pool_size = '60817392' %}
{% set egress_lossy_pool_size = '56623104' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
Expand All @@ -14,12 +11,10 @@
{%- 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"
},
Expand All @@ -29,7 +24,6 @@
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
Expand All @@ -38,7 +32,7 @@
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
Expand All @@ -52,8 +46,8 @@
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Expand Down
Loading