2018-10-17 16:10:34 -05:00
{%- set PORT_ALL = [] %}
2023-06-12 16:02:22 -05:00
{%- set PORT_BP = [] %}
2023-07-19 17:00:39 -05:00
{%- set SYSTEM_PORT_ALL = [] %}
{%- set voq_chassis = false %}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost']['switch_type'] is defined and DEVICE_METADATA['localhost']['switch_type'] == 'voq' %}
{%- set voq_chassis = true %}
{%- endif -%}
{%- if voq_chassis %}
{%- for system_port in SYSTEM_PORT %}
{% if '|' not in system_port %}
{%- set system_port_name = system_port|join("|") %}
{% else %}
{%- set system_port_name = system_port %}
{% endif %}
{%- if 'cpu' not in system_port_name.lower() and 'IB' not in system_port_name and 'Rec' not in system_port_name %}
{%- if SYSTEM_PORT_ALL.append(system_port_name) %}{%- endif %}
{%- endif %}
{%- endfor %}
{%- endif %}
2018-10-17 16:10:34 -05:00
{%- for port in PORT %}
2022-03-09 18:04:36 -06:00
{%- if not port.startswith('Ethernet-Rec') and not port.startswith('Ethernet-IB') %}
{%- if PORT_ALL.append(port) %}{% endif %}
{%- endif %}
2018-10-17 16:10:34 -05:00
{%- endfor %}
2023-06-12 16:02:22 -05:00
{%- if generate_bp_port_list is defined %}
{%- if generate_bp_port_list(PORT,PORT_BP) %} {% endif %}
{%- endif %}
2018-10-17 16:10:34 -05:00
{%- if PORT_ALL | sort_by_port_index %}{% endif %}
{%- set port_names_list_all = [] %}
{%- for port in PORT_ALL %}
{%- if port_names_list_all.append(port) %}{% endif %}
{%- endfor %}
{%- set port_names_all = port_names_list_all | join(',') -%}
{%- set PORT_ACTIVE = [] %}
{%- if DEVICE_NEIGHBOR is not defined %}
{%- set PORT_ACTIVE = PORT_ALL %}
{%- else %}
{%- for port in DEVICE_NEIGHBOR.keys() %}
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
{%- endfor %}
2023-06-12 16:02:22 -05:00
{%- for port in PORT_BP %}
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
{%- endfor %}
2018-10-17 16:10:34 -05:00
{%- endif %}
{%- if PORT_ACTIVE | sort_by_port_index %}{% endif %}
{%- set port_names_list_active = [] %}
{%- for port in PORT_ACTIVE %}
{%- if port_names_list_active.append(port) %}{%- endif %}
{%- endfor %}
{%- set port_names_active = port_names_list_active | join(',') -%}
2022-06-02 08:48:57 -05:00
{%- set tunnel_qos_remap_enable = false %}
{%- if ((SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled')) %}
{%- set tunnel_qos_remap_enable = true %}
{%- endif %}
2022-04-05 09:32:25 -05:00
{%- set port_names_list_extra_queues = [] %}
{%- for port in PORT_ACTIVE %}
2022-06-02 08:48:57 -05:00
{% if ((generate_dscp_to_tc_map is defined) and tunnel_qos_remap_enable) and
(('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'ToRRouter') or
('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'LeafRouter')) %}
2022-04-05 09:32:25 -05:00
{%- if port_names_list_extra_queues.append(port) %}{%- endif %}
2022-06-02 08:48:57 -05:00
{% endif %}
2022-04-05 09:32:25 -05:00
{%- endfor %}
2018-10-17 16:10:34 -05:00
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
2019-09-13 13:28:25 -05:00
{%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%}
2022-02-23 19:22:41 -06:00
{%- set apollo_resource_types = ['DL-NPU-Apollo'] -%}
2018-10-17 16:10:34 -05:00
2022-07-14 12:19:00 -05:00
{%- set require_global_dscp_to_tc_map = true -%}
2018-10-17 16:10:34 -05:00
{
2022-06-02 08:48:57 -05:00
{% if (generate_tc_to_pg_map is defined) and tunnel_qos_remap_enable %}
2018-10-17 16:10:34 -05:00
{{- generate_tc_to_pg_map() }}
2023-08-31 13:30:20 -05:00
{% elif (generate_tc_to_pg_map is defined) and
('type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['type'] in backend_device_types) and
('resource_type' in DEVICE_METADATA['localhost'] and
2024-01-28 20:10:54 -06:00
DEVICE_METADATA['localhost']['resource_type'] == 'ComputeAI') %}
2023-08-31 13:30:20 -05:00
{{- generate_tc_to_pg_map() }}
2018-10-17 16:10:34 -05:00
{% else %}
"TC_TO_PRIORITY_GROUP_MAP": {
"AZURE": {
"0": "0",
2019-03-08 04:23:32 -06:00
"1": "0",
"2": "0",
2018-10-17 16:10:34 -05:00
"3": "3",
"4": "4",
2019-03-08 04:23:32 -06:00
"5": "0",
"6": "0",
2018-10-17 16:10:34 -05:00
"7": "7"
}
},
{% endif %}
"MAP_PFC_PRIORITY_TO_QUEUE": {
"AZURE": {
"0": "0",
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7"
}
},
2022-06-02 08:48:57 -05:00
{% if (generate_tc_to_queue_map is defined) and tunnel_qos_remap_enable %}
2022-04-05 09:32:25 -05:00
{{- generate_tc_to_queue_map() }}
{% else %}
2018-10-17 16:10:34 -05:00
"TC_TO_QUEUE_MAP": {
"AZURE": {
"0": "0",
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7"
}
},
2022-04-05 09:32:25 -05:00
{% endif %}
2020-11-10 17:06:35 -06:00
{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true' %}
2022-07-14 12:19:00 -05:00
{%- set require_global_dscp_to_tc_map = false %}
2019-09-13 13:28:25 -05:00
"DOT1P_TO_TC_MAP": {
"AZURE": {
2021-05-20 12:36:39 -05:00
"0": "1",
"1": "0",
2019-09-13 13:28:25 -05:00
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7"
}
},
2022-06-02 08:48:57 -05:00
{% elif (generate_dscp_to_tc_map is defined) and tunnel_qos_remap_enable %}
2022-04-05 09:32:25 -05:00
{{- generate_dscp_to_tc_map() }}
2023-08-31 13:30:20 -05:00
{% elif (generate_dscp_to_tc_map is defined) and
('type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['type'] in backend_device_types) and
('resource_type' in DEVICE_METADATA['localhost'] and
2024-01-28 20:10:54 -06:00
DEVICE_METADATA['localhost']['resource_type'] == 'ComputeAI') %}
2023-08-31 13:30:20 -05:00
{{- generate_dscp_to_tc_map() }}
2019-09-13 13:28:25 -05:00
{% else %}
2018-10-17 16:10:34 -05:00
"DSCP_TO_TC_MAP": {
"AZURE": {
2019-01-30 21:00:13 -06:00
"0" : "1",
"1" : "1",
"2" : "1",
2018-10-17 16:10:34 -05:00
"3" : "3",
"4" : "4",
2019-01-30 21:00:13 -06:00
"5" : "2",
"6" : "1",
"7" : "1",
"8" : "0",
"9" : "1",
"10": "1",
"11": "1",
"12": "1",
"13": "1",
"14": "1",
"15": "1",
"16": "1",
"17": "1",
"18": "1",
"19": "1",
"20": "1",
"21": "1",
"22": "1",
"23": "1",
"24": "1",
"25": "1",
"26": "1",
"27": "1",
"28": "1",
"29": "1",
"30": "1",
"31": "1",
"32": "1",
"33": "1",
"34": "1",
"35": "1",
"36": "1",
"37": "1",
"38": "1",
"39": "1",
"40": "1",
"41": "1",
"42": "1",
"43": "1",
"44": "1",
"45": "1",
2018-12-04 22:51:55 -06:00
"46": "5",
2019-01-30 21:00:13 -06:00
"47": "1",
"48": "6",
"49": "1",
"50": "1",
"51": "1",
"52": "1",
"53": "1",
"54": "1",
"55": "1",
"56": "1",
"57": "1",
"58": "1",
"59": "1",
"60": "1",
"61": "1",
"62": "1",
"63": "1"
2018-10-17 16:10:34 -05:00
}
},
2019-09-13 13:28:25 -05:00
{% endif %}
2022-06-02 08:48:57 -05:00
{% if (generate_tc_to_dscp_map is defined) and tunnel_qos_remap_enable %}
2022-04-25 02:06:10 -05:00
{{- generate_tc_to_dscp_map() }}
{% endif %}
2022-02-23 19:22:41 -06:00
{% if 'resource_type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['resource_type'] in apollo_resource_types %}
"SCHEDULER": {
"scheduler.0": {
"type" : "DWRR",
"weight": "1"
},
"scheduler.1": {
"type" : "DWRR",
"weight": "1"
},
"scheduler.2": {
"type" : "DWRR",
"weight": "100"
}
},
2023-08-31 13:30:20 -05:00
{% elif (generate_tc_to_pg_map is defined) and
('type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['type'] in backend_device_types) and
('resource_type' in DEVICE_METADATA['localhost'] and
2024-01-28 20:10:54 -06:00
DEVICE_METADATA['localhost']['resource_type'] == 'ComputeAI') %}
2023-08-31 13:30:20 -05:00
"SCHEDULER": {
"scheduler.0": {
"type" : "DWRR",
"weight": "40"
},
"scheduler.1": {
"type" : "DWRR",
"weight": "30"
},
"scheduler.2": {
"type" : "DWRR",
"weight": "25"
},
"scheduler.3": {
"type" : "DWRR",
"weight": "5"
}
},
2022-02-23 19:22:41 -06:00
{% else %}
2018-10-17 16:10:34 -05:00
"SCHEDULER": {
"scheduler.0": {
"type" : "DWRR",
2019-01-30 21:00:13 -06:00
"weight": "14"
},
"scheduler.1": {
"type" : "DWRR",
"weight": "15"
2018-10-17 16:10:34 -05:00
}
},
2022-02-23 19:22:41 -06:00
{% endif %}
2018-10-17 16:10:34 -05:00
{% if asic_type in pfc_to_pg_map_supported_asics %}
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
2022-07-20 01:48:15 -05:00
{% if port_names_list_extra_queues|length > 0 %}
"AZURE_DUALTOR": {
"2": "2",
"3": "3",
"4": "4",
"6": "6"
},
{% endif %}
2018-10-17 16:10:34 -05:00
"AZURE": {
"3": "3",
"4": "4"
}
},
{% endif %}
"PORT_QOS_MAP": {
2022-06-16 19:44:30 -05:00
{% if generate_global_dscp_to_tc_map is defined %}
{{- generate_global_dscp_to_tc_map() }}
2022-07-14 12:19:00 -05:00
{% elif require_global_dscp_to_tc_map %}
2022-06-16 19:44:30 -05:00
"global": {
"dscp_to_tc_map" : "AZURE"
}{% if PORT_ACTIVE %},{% endif %}
2022-11-03 19:12:00 -05:00
2022-06-16 19:44:30 -05:00
{% endif %}
2019-10-02 15:01:16 -05:00
{% for port in PORT_ACTIVE %}
"{{ port }}": {
2020-11-10 17:06:35 -06:00
{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true' %}
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
"dot1p_to_tc_map" : "AZURE",
2022-07-20 01:48:15 -05:00
{% else %}
2022-11-21 13:42:28 -06:00
{# Apply separated DSCP_TO_TC_MAP to uplink ports on ToR and Leaf #}
{% if different_dscp_to_tc_map and tunnel_qos_remap_enable %}
{% if ('type' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['type'] == 'LeafRouter') and (port not in port_names_list_extra_queues) %}
2022-07-20 01:48:15 -05:00
"dscp_to_tc_map" : "AZURE_UPLINK",
2022-11-21 13:42:28 -06:00
{% elif ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'] == 'DualToR') and (port in port_names_list_extra_queues) %}
"dscp_to_tc_map" : "AZURE_UPLINK",
{% else %}
"dscp_to_tc_map" : "AZURE",
{% endif %}
2019-09-13 13:28:25 -05:00
{% else %}
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
"dscp_to_tc_map" : "AZURE",
2022-07-20 01:48:15 -05:00
{% endif %}
2019-09-13 13:28:25 -05:00
{% endif %}
2022-11-21 13:42:28 -06:00
{# Apply separated TC_TO_QUEUE_MAP to uplink ports on ToR #}
{% if different_tc_to_queue_map and tunnel_qos_remap_enable and port in port_names_list_extra_queues %}
"tc_to_queue_map" : "AZURE_UPLINK",
{% else %}
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
"tc_to_queue_map" : "AZURE",
2022-11-21 13:42:28 -06:00
{% endif %}
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
"tc_to_pg_map" : "AZURE",
"pfc_to_queue_map": "AZURE",
2018-10-17 16:10:34 -05:00
{% if asic_type in pfc_to_pg_map_supported_asics %}
2022-07-20 01:48:15 -05:00
{% if port in port_names_list_extra_queues %}
"pfc_to_pg_map" : "AZURE_DUALTOR",
{% else %}
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
"pfc_to_pg_map" : "AZURE",
2018-10-17 16:10:34 -05:00
{% endif %}
2022-07-20 01:48:15 -05:00
{% endif %}
2022-04-05 09:32:25 -05:00
{% if port in port_names_list_extra_queues %}
"pfc_enable" : "2,3,4,6",
{% else %}
"pfc_enable" : "3,4",
{% endif %}
"pfcwd_sw_enable" : "3,4"
2019-10-02 15:01:16 -05:00
}{% if not loop.last %},{% endif %}
{% endfor %}
2018-10-17 16:10:34 -05:00
},
2020-05-09 13:21:18 -05:00
{% if generate_wred_profiles is defined %}
{{- generate_wred_profiles() }}
{% else %}
2018-10-17 16:10:34 -05:00
"WRED_PROFILE": {
"AZURE_LOSSLESS" : {
2018-12-04 22:51:55 -06:00
"wred_green_enable" : "true",
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "2097152",
"green_min_threshold" : "1048576",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
"red_max_threshold" : "2097152",
"red_min_threshold" : "1048576",
"green_drop_probability" : "5",
"yellow_drop_probability": "5",
"red_drop_probability" : "5"
2018-10-17 16:10:34 -05:00
}
},
2020-05-09 13:21:18 -05:00
{% endif %}
2023-07-19 17:00:39 -05:00
{% if voq_chassis %}
2018-10-17 16:10:34 -05:00
"QUEUE": {
2023-07-19 17:00:39 -05:00
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|3": {
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|4": {
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|0": {
"scheduler": "scheduler.0"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|1": {
"scheduler": "scheduler.0"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|2": {
"scheduler": "scheduler.0"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|5": {
"scheduler": "scheduler.0"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|6": {
"scheduler": "scheduler.0"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
{% else %}
"QUEUE": {
2023-08-31 13:30:20 -05:00
{% if 'type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['type'] in backend_device_types and
'resource_type' in DEVICE_METADATA['localhost'] and
2024-01-28 20:10:54 -06:00
DEVICE_METADATA['localhost']['resource_type'] == 'ComputeAI' %}
2023-08-31 13:30:20 -05:00
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
"scheduler": "scheduler.0"
},
"{{ port }}|1": {
"scheduler": "scheduler.1"
},
"{{ port }}|3": {
"scheduler" : "scheduler.2",
"wred_profile": "AZURE_LOSSLESS"
},
"{{ port }}|4": {
"scheduler" : "scheduler.3",
"wred_profile": "AZURE_LOSSLESS"
}{% if not loop.last %},{% endif %}
{% endfor %}
{% else %}
2018-10-17 16:10:34 -05:00
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
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
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
2018-10-17 16:10:34 -05:00
},
{% endfor %}
2022-02-23 19:22:41 -06:00
{% if 'resource_type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['resource_type'] in apollo_resource_types %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
"scheduler" : "scheduler.2",
"wred_profile": "AZURE_LOSSLESS"
},
{% endfor %}
{% else %}
2018-10-17 16:10:34 -05:00
{% for port in PORT_ACTIVE %}
"{{ port }}|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
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
2018-10-17 16:10:34 -05:00
},
{% endfor %}
2022-02-23 19:22:41 -06:00
{% endif %}
2018-10-17 16:10:34 -05:00
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
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
"scheduler": "scheduler.0"
2018-10-17 16:10:34 -05:00
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
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
"scheduler": "scheduler.0"
2018-12-04 22:51:55 -06:00
},
{% endfor %}
2019-01-30 21:00:13 -06:00
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
2022-06-02 08:48:57 -05:00
{% if port in port_names_list_extra_queues %}
2022-04-05 09:32:25 -05:00
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
2022-06-02 08:48:57 -05:00
{% else %}
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
"scheduler": "scheduler.0"
2022-06-02 08:48:57 -05:00
{% endif %}
2019-01-30 21:00:13 -06:00
},
{% endfor %}
2018-12-04 22:51:55 -06:00
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
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
"scheduler": "scheduler.0"
2019-01-30 21:00:13 -06:00
},
2022-11-03 19:12:00 -05:00
{# DSCP 48 is mapped to QUEUE 7 in macro generate_dscp_to_tc_map #}
{% if (generate_dscp_to_tc_map is defined) and tunnel_qos_remap_enable %}
"{{ port }}|7": {
"scheduler": "scheduler.0"
},
{% endif %}
2019-01-30 21:00:13 -06:00
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
2022-06-02 08:48:57 -05:00
{% if port in port_names_list_extra_queues %}
2022-04-05 09:32:25 -05:00
"scheduler" : "scheduler.1",
2022-06-02 08:48:57 -05:00
"wred_profile": "AZURE_LOSSLESS"
{% else %}
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
"scheduler": "scheduler.0"
2022-06-02 08:48:57 -05:00
{% endif %}
2018-10-17 16:10:34 -05:00
}{% if not loop.last %},{% endif %}
{% endfor %}
2023-08-31 13:30:20 -05:00
{% endif %}
2018-10-17 16:10:34 -05:00
}
2023-07-19 17:00:39 -05:00
{% endif %}
2018-10-17 16:10:34 -05:00
}