diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/buffers_defaults_t2.j2 b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/buffers_defaults_t2.j2 index 82b04ee679..e59e13a92a 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/buffers_defaults_t2.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/buffers_defaults_t2.j2 @@ -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": { @@ -46,7 +46,7 @@ "egress_lossy_profile": { "pool":"ingress_lossless_pool", "size":"0", - "dynamic_th":"-4" + "dynamic_th":"-6" } }, {%- endmacro %} diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/pg_profile_lookup.ini b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/pg_profile_lookup.ini index 3c93a65abb..f66cbdba0e 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/pg_profile_lookup.ini +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/pg_profile_lookup.ini @@ -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 diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/qos.json.j2 b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/qos.json.j2 index b28c251ad5..30474c5f98 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/qos.json.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/qos.json.j2 @@ -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' %} diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/buffers_defaults_t2.j2 b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/buffers_defaults_t2.j2 index 6d6e6d3b1b..e59e13a92a 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/buffers_defaults_t2.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/buffers_defaults_t2.j2 @@ -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) %} @@ -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 %} diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/pg_profile_lookup.ini b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/pg_profile_lookup.ini new file mode 100644 index 0000000000..f66cbdba0e --- /dev/null +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/pg_profile_lookup.ini @@ -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 diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2 b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2 index 96566a6379..30474c5f98 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2 @@ -1,174 +1,7 @@ -{%- 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) %} @@ -176,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' %} diff --git a/platform/broadcom/sonic-platform-modules-nexthop/nh-5010/utils/asic_init.sh b/platform/broadcom/sonic-platform-modules-nexthop/nh-5010/utils/asic_init.sh index ee3beacdf5..ea355d0e84 100755 --- a/platform/broadcom/sonic-platform-modules-nexthop/nh-5010/utils/asic_init.sh +++ b/platform/broadcom/sonic-platform-modules-nexthop/nh-5010/utils/asic_init.sh @@ -181,12 +181,20 @@ clear_sticky_bits # Switchcard revision is in Komodo FPGA register 0x44 bottom 4 bits switchcard_revision=$(($(komodo_fpga_read 0x44) & 0xF)) -# Take the asic out of reset -fpga_write 0x8 0x112 +# Q3D_RESET_RELEASE=0 +fpga write32 "$FPGA_BDF" 0x8 0x0 --bits "10:10" +sleep 0.001 + +# DP_PWR_ON_DRV=0 +fpga write32 "$FPGA_BDF" 0x90 0x0 --bits "4:4" sleep 2 -fpga_write 0x8 0x102 + +# DP_PWR_ON_DRV=1 +fpga write32 "$FPGA_BDF" 0x90 0x1 --bits "4:4" sleep 0.2 -fpga_write 0x8 0x502 + +# Q3D_RESET_RELEASE=1 +fpga write32 "$FPGA_BDF" 0x8 0x1 --bits "10:10" enable_phy diff --git a/src/sonic-dash-api b/src/sonic-dash-api index 3f22b2c57a..63d9cb23a9 160000 --- a/src/sonic-dash-api +++ b/src/sonic-dash-api @@ -1 +1 @@ -Subproject commit 3f22b2c57ab5ce074f71f5e006c55aa511c739e7 +Subproject commit 63d9cb23a9bd11fdc75d4442d46155262d86c527