2021-10-17 11:03:02 -05:00
|
|
|
{#
|
|
|
|
Copyright (c) 2019-2021 NVIDIA CORPORATION & AFFILIATES.
|
|
|
|
Apache-2.0
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
#}
|
2020-03-11 15:44:18 -05:00
|
|
|
{% set default_cable = '5m' %}
|
2020-07-30 06:22:08 -05:00
|
|
|
{% set ingress_lossless_pool_size = '13924352' %}
|
|
|
|
{% set ingress_lossy_pool_size = '13924352' %}
|
|
|
|
{% set egress_lossless_pool_size = '34287552' %}
|
|
|
|
{% set egress_lossy_pool_size = '13924352' %}
|
2020-03-11 15:44:18 -05:00
|
|
|
|
|
|
|
{%- 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": {
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- if dynamic_mode is not defined %}
|
2020-03-11 15:44:18 -05:00
|
|
|
"size": "{{ ingress_lossless_pool_size }}",
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- endif %}
|
2020-03-11 15:44:18 -05:00
|
|
|
"type": "ingress",
|
|
|
|
"mode": "dynamic"
|
|
|
|
},
|
|
|
|
"ingress_lossy_pool": {
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- if dynamic_mode is not defined %}
|
2020-03-11 15:44:18 -05:00
|
|
|
"size": "{{ ingress_lossy_pool_size }}",
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- endif %}
|
2020-03-11 15:44:18 -05:00
|
|
|
"type": "ingress",
|
|
|
|
"mode": "dynamic"
|
|
|
|
},
|
|
|
|
"egress_lossless_pool": {
|
|
|
|
"size": "{{ egress_lossless_pool_size }}",
|
|
|
|
"type": "egress",
|
|
|
|
"mode": "dynamic"
|
|
|
|
},
|
|
|
|
"egress_lossy_pool": {
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- if dynamic_mode is not defined %}
|
2020-03-11 15:44:18 -05:00
|
|
|
"size": "{{ egress_lossy_pool_size }}",
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- endif %}
|
2020-03-11 15:44:18 -05:00
|
|
|
"type": "egress",
|
|
|
|
"mode": "dynamic"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"BUFFER_PROFILE": {
|
|
|
|
"ingress_lossless_profile": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"pool":"ingress_lossless_pool",
|
2020-03-11 15:44:18 -05:00
|
|
|
"size":"0",
|
2020-07-30 06:22:08 -05:00
|
|
|
"dynamic_th":"7"
|
2020-03-11 15:44:18 -05:00
|
|
|
},
|
|
|
|
"ingress_lossy_profile": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"pool":"ingress_lossy_pool",
|
2020-03-11 15:44:18 -05:00
|
|
|
"size":"0",
|
|
|
|
"dynamic_th":"3"
|
|
|
|
},
|
|
|
|
"egress_lossless_profile": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"pool":"egress_lossless_pool",
|
2020-03-11 15:44:18 -05:00
|
|
|
"size":"0",
|
|
|
|
"dynamic_th":"7"
|
|
|
|
},
|
|
|
|
"egress_lossy_profile": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"pool":"egress_lossy_pool",
|
2020-07-30 06:22:08 -05:00
|
|
|
"size":"9216",
|
|
|
|
"dynamic_th":"7"
|
2020-03-11 15:44:18 -05:00
|
|
|
},
|
|
|
|
"q_lossy_profile": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"pool":"egress_lossy_pool",
|
2020-03-11 15:44:18 -05:00
|
|
|
"size":"0",
|
|
|
|
"dynamic_th":"3"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{%- macro generate_profile_lists(port_names) %}
|
|
|
|
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
|
2020-03-11 15:44:18 -05:00
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
},
|
|
|
|
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"profile_list" : "egress_lossless_profile,egress_lossy_profile"
|
2020-03-11 15:44:18 -05:00
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{%- macro generate_queue_buffers(port_names) %}
|
|
|
|
"BUFFER_QUEUE": {
|
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}|3-4": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"profile" : "egress_lossless_profile"
|
2020-03-11 15:44:18 -05:00
|
|
|
},
|
|
|
|
{% endfor %}
|
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}|0-2": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"profile" : "q_lossy_profile"
|
2020-03-11 15:44:18 -05:00
|
|
|
},
|
|
|
|
{% endfor %}
|
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}|5-6": {
|
SONIC QOS YANG - Remove qos tables field value refernce format (#7752)
Depends on Azure/sonic-utilities#1626
Depends on Azure/sonic-swss#1754
QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.
Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".
Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Dependent pull requests:
#7752 - To modify platfrom files
#7281 - Yang model
Azure/sonic-utilities#1626 - DB migration
Azure/sonic-swss#1754 - swss change to remove ABNF format
2021-09-28 11:21:24 -05:00
|
|
|
"profile" : "q_lossy_profile"
|
2020-03-11 15:44:18 -05:00
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
}
|
|
|
|
{%- endmacro %}
|