Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "56441610000",
"size": "25766440000",
"type": "both",
"mode": "dynamic",
"xoff": "2822080500"
"xoff": "5301600256"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"ingress_lossless_pool",
"size":"0",
"xon_offset": "0",
"xon_offset": "0",
"dynamic_th":"0"
},
"egress_lossless_profile": {
Expand All @@ -46,7 +46,7 @@
"egress_lossy_profile": {
"pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"-4"
"dynamic_th":"-6"
}
},
{%- endmacro %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
25000 5m 18796 0 612140 0 3556
25000 40m 18796 0 612140 0 3556
25000 300m 18796 0 612140 0 3556
100000 5m 18796 0 612140 0 3556
100000 40m 18796 0 612140 0 3556
100000 300m 18796 0 612140 0 3556
200000 5m 18796 0 612140 0 3556
200000 40m 18796 0 612140 0 3556
200000 300m 18796 0 612140 0 3556
400000 5m 18796 0 612140 0 3556
400000 40m 18796 0 612140 0 3556
400000 50m 18796 0 612140 0 3556
400000 300m 18796 0 612140 0 3556
400000 2000m 18796 0 612140 0 3556
400000 120000m 18796 0 612140 0 3556
800000 5m 18796 0 612140 0 3556
800000 40m 18796 0 612140 0 3556
800000 300m 18796 0 612140 0 3556
# speed cable size xon xoff threshold xon_offset
100000 300m 0 0 98304 -6 363506
100000 2000m 0 0 376832 -6 363506
100000 120000m 0 0 19664896 -6 363506
400000 300m 0 0 351232 -6 1454025
400000 2000m 0 0 1384448 -6 1454025
400000 120000m 0 0 82837504 -6 1454025
800000 300m 0 0 577536 -6 1454025
800000 2000m 0 0 2801664 -6 1454025
800000 120000m 0 0 157122560 -6 1454025
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,24 @@
{%- endfor %}
{%- endmacro %}

{%- macro generate_wred_profiles() %}
"WRED_PROFILE": {
"AZURE_LOSSLESS" : {
"wred_green_enable" : "true",
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "10000000",
"green_min_threshold" : "2000000",
"yellow_max_threshold" : "10000000",
"yellow_min_threshold" : "2000000",
"red_max_threshold" : "10000000",
"red_min_threshold" : "2000000",
"green_drop_probability" : "5",
"yellow_drop_probability": "5",
"red_drop_probability" : "5"
}
},
{%- endmacro %}

{%- include 'qos_config.j2' %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

{%- include 'buffer_ports.j2' %}

{%- set ports2cable = {
'torrouter_server' : '300m',
'leafrouter_torrouter' : '300m',
'spinerouter_leafrouter' : '2000m',
'upperspinerouter_spinerouter' : '50m',
'upperspinerouter_lowerspinerouter' : '50m',
'regionalhub_upperspinerouter': '120000m',
'aznghub_upperspinerouter' : '120000m',
'regionalhub_spinerouter': '120000m',
'aznghub_spinerouter' : '120000m'
}
-%}

{%- macro generate_qos_bypass_port_list(PORT_QOS_BYPASS) %}
{# Generate list of ports #}
{%- for port_idx in range(256, 261, 4) %}
Expand All @@ -11,47 +24,30 @@

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_pool": {
"size": "56441610000",
"ingress_lossless_pool": {
"size": "25766440000",
"type": "both",
"mode": "dynamic"
"mode": "dynamic",
"xoff": "5301600256"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"ingress_pool",
"pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
"xon_offset": "0",
"dynamic_th":"0"
},
"egress_lossless_profile": {
"pool":"ingress_pool",
"pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
"pool":"ingress_pool",
"pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
"dynamic_th":"-6"
}
},
{%- endmacro %}

{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
{% for port in port_names_active.split(',') %}
"{{ port }}|0-7": {
"profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
},
{%- endmacro %}

{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
{% for port in port_names_active.split(',') %}
"{{ port }}|0-7": {
"profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
{% endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
100000 300m 0 0 98304 -6 363506
100000 2000m 0 0 376832 -6 363506
100000 120000m 0 0 19664896 -6 363506
400000 300m 0 0 351232 -6 1454025
400000 2000m 0 0 1384448 -6 1454025
400000 120000m 0 0 82837504 -6 1454025
800000 300m 0 0 577536 -6 1454025
800000 2000m 0 0 2801664 -6 1454025
800000 120000m 0 0 157122560 -6 1454025
187 changes: 20 additions & 167 deletions device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2
Original file line number Diff line number Diff line change
@@ -1,179 +1,32 @@
{%- macro generate_dscp_to_tc_map_per_sku() -%}
"DSCP_TO_TC_MAP": {
"NH_DEFAULT_DSCP_TO_TC_MAP": {
"0" : "0",
"1" : "0",
"2" : "0",
"3" : "0",
"4" : "0",
"5" : "0",
"6" : "0",
"7" : "0",
"8" : "1",
"9" : "1",
"10": "1",
"11": "1",
"12": "1",
"13": "1",
"14": "1",
"15": "1",
"16": "2",
"17": "2",
"18": "2",
"19": "2",
"20": "2",
"21": "2",
"22": "2",
"23": "2",
"24": "3",
"25": "3",
"26": "3",
"27": "3",
"28": "3",
"29": "3",
"30": "3",
"31": "3",
"32": "4",
"33": "4",
"34": "4",
"35": "4",
"36": "4",
"37": "4",
"38": "4",
"39": "4",
"40": "5",
"41": "5",
"42": "5",
"43": "5",
"44": "5",
"45": "5",
"46": "5",
"47": "5",
"48": "6",
"49": "6",
"50": "6",
"51": "6",
"52": "6",
"53": "6",
"54": "6",
"55": "6",
"56": "7",
"57": "7",
"58": "7",
"59": "7",
"60": "7",
"61": "7",
"62": "7",
"63": "7"
}
},
{%- endmacro -%}

{%- macro generate_global_dscp_to_tc_map() %}
{# This is an empty macro since the global DSCP_TO_TC map is not required #}
{%- endmacro %}

{%- macro generate_tc_to_queue_map_per_sku() -%}
"TC_TO_QUEUE_MAP": {
"NH_DEFAULT_TC_TO_QUEUE_MAP": {
"0": "0",
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7"
}
},
{%- endmacro -%}

{%- macro generate_tc_to_pg_map_per_sku() -%}
"TC_TO_PRIORITY_GROUP_MAP": {
"NH_DEFAULT_TC_TO_PRI_GROUP_MAP": {
"0": "0",
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7"
}
},
{%- endmacro -%}

{%- macro generate_port_qos_map(port_names_active) -%}
"PORT_QOS_MAP": {
{% for port in port_names_active.split(',') %}
"{{ port }}": {
"dscp_to_tc_map" : "NH_DEFAULT_DSCP_TO_TC_MAP",
"tc_to_queue_map" : "NH_DEFAULT_TC_TO_QUEUE_MAP",
"tc_to_pg_map" : "NH_DEFAULT_TC_TO_PRI_GROUP_MAP"
}{% if not loop.last %},{% endif %}
{% endfor %}
},
{%- endmacro -%}

{%- macro generate_scheduler_per_sku() -%}
"SCHEDULER": {
"scheduler.0": {
"type" : "DWRR",
"weight": "20"
},
"scheduler.1": {
"type" : "DWRR",
"weight": "30"
},
"scheduler.2": {
"type" : "DWRR",
"weight": "50"
},
"scheduler.3": {
"cir": "2000000000",
"meter_type": "bytes",
"pir": "2000000000",
"type": "STRICT"
}
},
{%- endmacro -%}

{%- macro generate_single_queue_per_sku(port) -%}
"{{ port }}|0": {
"scheduler": "scheduler.0"
},
"{{ port }}|1": {
"scheduler": "scheduler.0"
},
"{{ port }}|2": {
"scheduler": "scheduler.1"
},
"{{ port }}|3": {
"scheduler": "scheduler.2"
},
"{{ port }}|4": {
"scheduler": "scheduler.2"
},
"{{ port }}|5": {
"scheduler": "scheduler.2"
},
"{{ port }}|6": {
"scheduler": "scheduler.3"
},
"{{ port }}|7": {
"scheduler": "scheduler.3"
}
{%- endmacro -%}

{%- macro generate_wred_profiles() %}
{# wred is disabled #}
{%- endmacro %}

{%- macro generate_qos_bypass_port_list(PORT_QOS_BYPASS) %}
{# Generate list of ports #}
{%- for port_idx in range(256, 261, 4) %}
{%- if PORT_QOS_BYPASS.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

{%- macro generate_wred_profiles() %}
"WRED_PROFILE": {
"AZURE_LOSSLESS" : {
"wred_green_enable" : "true",
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "10000000",
"green_min_threshold" : "2000000",
"yellow_max_threshold" : "10000000",
"yellow_min_threshold" : "2000000",
"red_max_threshold" : "10000000",
"red_min_threshold" : "2000000",
"green_drop_probability" : "5",
"yellow_drop_probability": "5",
"red_drop_probability" : "5"
}
},
{%- endmacro %}

{%- include 'qos_config.j2' %}
Loading