Skip to content

Commit

Permalink
Add SYSTEM_DEFAULTS table
Browse files Browse the repository at this point in the history
Signed-off-by: bingwang <wang.bing@microsoft.com>
  • Loading branch information
bingwang-ms committed May 26, 2022
1 parent d471bec commit 1aeb85b
Show file tree
Hide file tree
Showing 16 changed files with 616 additions and 158 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@
},
{%- endmacro %}

{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% import 'buffers_extra_queues.j2' as defs with context %}

{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
{%- endmacro %}
{%- macro generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) %}
{{ defs.generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) }}
{%- endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@
},
{%- endmacro %}

{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% import 'buffers_extra_queues.j2' as defs with context %}

{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
{%- endmacro %}
{%- macro generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) %}
{{ defs.generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) }}
{%- endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
"{{ port }}|0-1": {
"profile" : "egress_lossy_profile"
},
"{{ port }}|2": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|3-4": {
"{{ port }}|2-4": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|5": {
Expand Down Expand Up @@ -37,4 +34,22 @@
{% endfor %}
}
{% endmacro %}
{%- macro generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) %}
"BUFFER_PG": {
{% for port in port_names.split(',') %}
{% if port not in port_names_require_extra_lossless_pgs.split(',') %}
"{{ port }}|2": {
"profile" : "ingress_lossy_profile"
},
"{{ port }}|6": {
"profile" : "ingress_lossy_profile"
},
{% endif %}
"{{ port }}|0": {
"profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
},
{% endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@
},
{%- endmacro %}

{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% import 'buffers_extra_queues.j2' as defs with context %}

{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
{%- endmacro %}
{%- macro generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) %}
{{ defs.generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) }}
{%- endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@
},
{%- endmacro %}

{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% import 'buffers_extra_queues.j2' as defs with context %}

{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
{%- endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
"{{ port }}|0-1": {
"profile" : "egress_lossy_profile"
},
"{{ port }}|2": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|3-4": {
"{{ port }}|2-4": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|5": {
Expand Down Expand Up @@ -38,4 +35,22 @@
{% endfor %}
}
{% endmacro %}
{%- macro generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) %}
"BUFFER_PG": {
{% for port in port_names.split(',') %}
{% if port not in port_names_require_extra_lossless_pgs.split(',') %}
"{{ port }}|2": {
"profile" : "ingress_lossy_profile"
},
"{{ port }}|6": {
"profile" : "ingress_lossy_profile"
},
{% endif %}
"{{ port }}|0": {
"profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
},
{% endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@
},
{%- endmacro %}

{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% import 'buffers_extra_queues.j2' as defs with context %}

{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
{%- endmacro %}
{%- macro generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) %}
{{ defs.generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) }}
{%- endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@
},
{%- endmacro %}

{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% import 'buffers_extra_queues.j2' as defs with context %}

{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
{%- endmacro %}
{%- macro generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) %}
{{ defs.generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) }}
{%- endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
},
{%- endmacro %}

{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% import 'buffers_extra_queues.j2' as defs with context %}

{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
{%- endmacro %}
{% endif %}
4 changes: 4 additions & 0 deletions files/build_templates/buffers_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def
{{ defs.generate_pg_profils(port_names_active) }}
{% elif defs.generate_pg_profiles_with_inactive_ports is defined %}
{{ defs.generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) }},
{% elif defs.generate_pg_profiles_with_extra_lossy_pgs is defined %}
{{ defs.generate_pg_profiles_with_extra_lossy_pgs(port_names_active, port_names_extra_queues) }}
{% elif defs.generate_pg_profiles_with_extra_lossy_pgs_with_inactive_ports is defined %}
{{ defs.generate_pg_profiles_with_extra_lossy_pgs_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) }}
{% else %}
"BUFFER_PG": {
{% for port in PORT_ACTIVE %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2339,6 +2339,14 @@
</Devices>
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</MetadataDeclaration>
<SystemDefaultsDeclaration>
<a:SystemDefaults xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:SystemDefault>
<a:Name>TunnelQosRemapEnabled</a:Name>
<a:Value>True</a:Value>
</a:SystemDefault>
</a:SystemDefaults>
</SystemDefaultsDeclaration>
<LinkMetadataDeclaration>
<Link xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:LinkMetadata>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4605,6 +4605,14 @@
</Devices>
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</MetadataDeclaration>
<SystemDefaultsDeclaration>
<a:SystemDefaults xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:SystemDefault>
<a:Name>TunnelQosRemapEnabled</a:Name>
<a:Value>True</a:Value>
</a:SystemDefault>
</a:SystemDefaults>
</SystemDefaultsDeclaration>
<LinkMetadataDeclaration>
<Link xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:LinkMetadata>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2486,6 +2486,14 @@
</Devices>
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</MetadataDeclaration>
<SystemDefaultsDeclaration>
<a:SystemDefaults xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:SystemDefault>
<a:Name>TunnelQosRemapEnabled</a:Name>
<a:Value>True</a:Value>
</a:SystemDefault>
</a:SystemDefaults>
</SystemDefaultsDeclaration>
<Hostname>str-7260cx3-acs-7</Hostname>
<HwSku>Arista-7260CX3-C64</HwSku>
</DeviceMiniGraph>
Loading

0 comments on commit 1aeb85b

Please sign in to comment.