Skip to content

Commit

Permalink
[brcm] Update SOC properties for DLR_INIT based pfcwd recovery (sonic…
Browse files Browse the repository at this point in the history
…-net#15286)

* [202205] Update SOC properties for DLR_INIT based pfcwd recovery (sonic-net#15217)

Why I did it
Update soc properties for certain roles that need to use pfcwd dlr init based recovery mechanism

How to verify it
Updated the templates on a 7050cx3 dual tor and 7260 T1 which satisfies these conditions and validated pfcwd recovery which uses DLR_INIT based mechanism. Also validated that this mechanism is not used on 7050cx3 single tor with the updated templates

Signed-off-by: Neetha John <[email protected]>
  • Loading branch information
neethajohn authored and pull[bot] committed Feb 4, 2024
1 parent 69fbd46 commit f09da99
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set map_prio = '' -%}
{%- set pfcwd_sock = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['subtype'] is defined -%}
{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
{%- if 'dualtor' in switch_subtype.lower() %}
{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- if SYSTEM_DEFAULTS is defined and 'tunnel_qos_remap' in SYSTEM_DEFAULTS and SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled' -%}
{%- set pfcwd_sock =
'hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1' -%}
{%- endif %}
sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_premium_issu/b870.6.4.1/
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
sai_verify_incoming_chksum=0
{{ map_prio }}
{{ pfcwd_sock }}
host_as_route_disable=1
use_all_splithorizon_groups=1
riot_enable=1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set map_prio = '' -%}
{%- set pfcwd_sock = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['subtype'] is defined -%}
{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
{%- if 'dualtor' in switch_subtype.lower() %}
{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- if SYSTEM_DEFAULTS is defined and 'tunnel_qos_remap' in SYSTEM_DEFAULTS and SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled' -%}
{%- set pfcwd_sock =
'hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1' -%}
{%- endif %}
sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_premium_issu/b870.6.4.1/
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
sai_verify_incoming_chksum=0
{{ map_prio }}
{{ pfcwd_sock }}
host_as_route_disable=1
use_all_splithorizon_groups=1
riot_enable=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{%- set mmu_sock = 'mmu_init_config="MSFT-TH2-Tier1"' -%}
{%- set IPinIP_sock = '' -%}
{%- set map_prio = '' -%}
{%- set pfcwd_sock = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined -%}
{%- if DEVICE_METADATA['localhost']['type'] is defined -%}
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
Expand All @@ -12,19 +13,27 @@
{%- if DEVICE_METADATA['localhost']['subtype'] is defined -%}
{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
{%- if 'dualtor' in switch_subtype.lower() %}
{%- set IPinIP_sock = 'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set IPinIP_sock =
'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- endif %}
{%- if SYSTEM_DEFAULTS is defined and 'tunnel_qos_remap' in SYSTEM_DEFAULTS and SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled' -%}
{%- set pfcwd_sock =
'hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1' -%}
{%- endif %}
{# The following is the common soc properties that used to be named "th2-a7260cx3-64-64x100G-t1.config.bcm" #}

l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
{{ map_prio }}
{{ pfcwd_sock }}
PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set IPinIP_sock = '' -%}
{%- set map_prio = '' -%}
{%- set pfcwd_sock = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['subtype'] is defined -%}
{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
{%- if 'dualtor' in switch_subtype.lower() %}
{%- set IPinIP_sock = 'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set IPinIP_sock =
'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- if SYSTEM_DEFAULTS is defined and 'tunnel_qos_remap' in SYSTEM_DEFAULTS and SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled' -%}
{%- set pfcwd_sock =
'hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1' -%}
{%- endif %}
{# The following is the common soc properties that used to be named "th2-a7260cx3-64-112x50G+8x100G.config.bcm" #}
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
{{ map_prio }}
{{ pfcwd_sock }}
PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set IPinIP_sock = '' -%}
{%- set map_prio = '' -%}
{%- set pfcwd_sock = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['subtype'] is defined -%}
{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
{%- if 'dualtor' in switch_subtype.lower() %}
{%- set IPinIP_sock = 'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set IPinIP_sock =
'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- if SYSTEM_DEFAULTS is defined and 'tunnel_qos_remap' in SYSTEM_DEFAULTS and SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled' -%}
{%- set pfcwd_sock =
'hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1' -%}
{%- endif %}
{# The following is the common soc properties that used to be named "th2-a7260cx3-64-112x50G+8x100G.config.bcm" #}
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
{{ map_prio }}
{{ pfcwd_sock }}
PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{%- set mmu_sock = 'mmu_init_config="MSFT-TH2-Tier1"' -%}
{%- set IPinIP_sock = '' -%}
{%- set map_prio = '' -%}
{%- set pfcwd_sock = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined -%}
{%- if DEVICE_METADATA['localhost']['type'] is defined -%}
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
Expand All @@ -12,18 +13,26 @@
{%- if DEVICE_METADATA['localhost']['subtype'] is defined -%}
{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
{%- if 'dualtor' in switch_subtype.lower() %}
{%- set IPinIP_sock = 'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set IPinIP_sock =
'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- endif %}
{%- if SYSTEM_DEFAULTS is defined and 'tunnel_qos_remap' in SYSTEM_DEFAULTS and SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled' -%}
{%- set pfcwd_sock =
'hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1' -%}
{%- endif %}
{# The following is the common soc properties that used to be named "th2-a7260cx3-64-64x40G.config.bcm" #}
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
{{ map_prio }}
{{ pfcwd_sock }}
PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
Expand Down
17 changes: 13 additions & 4 deletions src/sonic-config-engine/tests/data/j2_template/config.bcm.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{%- set mmu_sock = 'mmu_init_config="MSFT-TH2-Tier1"' -%}
{%- set IPinIP_sock = '' -%}
{%- set map_prio = '' -%}
{%- set pfcwd_sock = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined -%}
{%- if DEVICE_METADATA['localhost']['type'] is defined -%}
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
Expand All @@ -12,17 +13,25 @@
{%- if DEVICE_METADATA['localhost']['subtype'] is defined -%}
{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
{%- if 'dualtor' in switch_subtype.lower() %}
{%- set IPinIP_sock = 'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set IPinIP_sock =
'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- endif %}
{%- if SYSTEM_DEFAULTS is defined and 'tunnel_qos_remap' in SYSTEM_DEFAULTS and SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled' -%}
{%- set pfcwd_sock =
'hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1' -%}
{%- endif %}
{# The following is the common soc properties that used to be named "th2-a7260cx3-64-64x100G-t1.config.bcm" #}

l3_alpm_hit_skip=1
{{ map_prio }}
{{ mmu_sock }}
{{ IPinIP_sock }}
{{ pfcwd_sock }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ l3_alpm_hit_skip=1
sai_remap_prio_on_tnl_egress=1
mmu_init_config="MSFT-TH2-Tier0"
sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2
hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ l3_alpm_hit_skip=1
sai_remap_prio_on_tnl_egress=1
mmu_init_config="MSFT-TH2-Tier0"
sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2
hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ l3_alpm_hit_skip=1

mmu_init_config="MSFT-TH2-Tier1"

hybrid_pfc_deadlock_enable=1
pfc_deadlock_seq_control=1
sai_pfc_dlr_init_capability=1

0 comments on commit f09da99

Please sign in to comment.