Skip to content

Commit

Permalink
[Tunnel PFC] Add property for tunnel PFC (sonic-net#10962)
Browse files Browse the repository at this point in the history
*[Cherry-pick] [Tunnel PFC] Add property for tunnel PFC

Replace the config.bcm file with j2 template file
- Add 'sai_remap_prio_on_tnl_egress=1' property when device metadata local
- Host subtype is 'dualtor'
- Change sai.profile foe the new config.bcm.j2
  • Loading branch information
richardyu-ms committed Jun 6, 2022
1 parent ec9732a commit 5505b6d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set map_prio = '' -%}
{%- 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 %}
sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_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 }}
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,2 +1,2 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-a7050cx3-32s-32x100G.config.bcm
SAI_INIT_CONFIG_FILE=/etc/sai.d/config.bcm
SAI_NUM_ECMP_MEMBERS=64
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set map_prio = '' -%}
{%- 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 %}
sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_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 }}
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,2 +1,2 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-a7050cx3-32s-48x50G+8x100G.config.bcm
SAI_INIT_CONFIG_FILE=/etc/sai.d/config.bcm
SAI_NUM_ECMP_MEMBERS=64
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set mmu_sock = 'mmu_init_config="MSFT-TH2-Tier1"' -%}
{%- set IPinIP_sock = '' -%}
{%- set map_prio = '' -%}
{%- 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 @@ -15,13 +16,15 @@
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 %}
{# 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 }}
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,17 +1,20 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set IPinIP_sock = '' -%}
{%- set map_prio = '' -%}
{%- 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' -%}
l3_ecmp_levels=2' -%} -%}
{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- 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 }}
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,6 +1,7 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set mmu_sock = 'mmu_init_config="MSFT-TH2-Tier1"' -%}
{%- set IPinIP_sock = '' -%}
{%- set map_prio = '' -%}
{%- 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 @@ -15,12 +16,14 @@
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 %}
{# 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 }}
PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
Expand Down

0 comments on commit 5505b6d

Please sign in to comment.