Skip to content

Commit

Permalink
7260cx3 DualToR config.bcm support based on DualToR setting in device…
Browse files Browse the repository at this point in the history
… metadata at boot time (sonic-net#7168)

* 7260cx3 DualToR config.bcm support based on DualToR setting in device metadata at boot time. 
For HWSKU Arista-7260CX3-C64 the MMU setting SOC for T0/T1 is also combined into the config.bcm.j2 logic so use just one config file and adding delta based on Switch Roles.
  • Loading branch information
gechiang authored and raphaelt-nvidia committed May 13, 2021
1 parent e9e237a commit d43e5eb
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 1,032 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
{# 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 = '' -%}
{%- 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'] -%}
{%- if 'torrouter' in switch_role.lower() or 'torswitch' in switch_role.lower() %}
{%- set mmu_sock = 'mmu_init_config="MSFT-TH2-Tier0"' -%}
{%- endif %}
{%- endif %}
{%- 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
host_as_route_disable=1
l3_ecmp_levels=2' -%}
{%- endif %}
{%- endif %}
{%- endif %}
{# The following is the common soc properties that used to be named "th2-a7260cx3-64-64x100G-t1.config.bcm" #}

PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
Expand Down Expand Up @@ -1012,4 +1033,5 @@ serdes_preemphasis_115=0x184606
serdes_preemphasis_116=0x103706
serdes_preemphasis_117=0x133c06

mmu_init_config="MSFT-TH2-Tier0"
{{ mmu_sock }}
{{ IPinIP_sock }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SAI_INIT_CONFIG_FILE=/etc/sai.d/config.bcm
SAI_NUM_ECMP_MEMBERS=64

This file was deleted.

Loading

0 comments on commit d43e5eb

Please sign in to comment.