Forwarding table sizes
Trident 3 has a pool of shared hash memory, the unified forwarding table
(UFT), that is divided between the MAC (L2) table, the L3 host table, the
exact-match table and ALPM route storage when the chip is initialised. The
division is set in config.bcm and cannot change while the switch runs.
Example: a larger MAC table
To double the MAC table on a switch without ALPM:
-l2_mem_entries=32768
+l2_mem_entries=65536
This uses one shared bank. After a syncd restart, check the value the
SDK read and the capacity SONiC sees:
Unvalidated
drivshell> config get l2_mem_entries
drivshell> echo $config_var_val
Unvalidated
admin@sonic:~$ crm show resources all
Route tables
Without ALPM, route prefixes are stored in the LPM TCAM.
ipv6_lpm_128b_enableAllows IPv6 prefixes longer than /64. Every SONiC Trident 3 file sets it.
num_ipv6_lpm_128b_entriesHow many of those long IPv6 prefixes to reserve room for (default 4096). Each takes the space of several IPv4 or short IPv6 prefixes.
lpm_scaling_enable1also allows 64-bit IPv6 prefixes in the unreserved paired TCAM. The Celestica Seastone2 files set it.l3_alpm_enable1(parallel) or2(combined) moves prefixes to ALPM, which holds many more routes in shared UFT banks. The Dell S5232F-ON files usel3_alpm_enable=2withlpm_scaling_enable=0.
The number of routes that fit depends on the prefix lengths and the mix of
IPv4 and IPv6; there is no single “route count”. crm show resources all
shows what SONiC can still add.
ECMP
l3_ecmp_levels1(default) or2. Two levels (hierarchical ECMP) are needed for VXLAN overlay ECMP across underlay ECMP and split the ECMP tables between the levels.l3_max_ecmp_modeECMP scaling mode;
1in most SONiC Trident 3 files.SAI_NUM_ECMP_MEMBERSinsai.profileThe largest ECMP group SONiC creates (64 in the lab HWSKUs). It is a SAI setting, not a configuration variable.
VXLAN and routing into tunnels
VXLAN in SONiC needs the flex-flow VXLAN engine, routing in and out of tunnels (RIOT) and SAI tunnel support. The Seastone2 VXLAN HWSKU sets:
sai_tunnel_support=1
use_all_splithorizon_groups=1
bcm_tunnel_term_compatible_mode=1
flow_init_mode=1
l3_ecmp_levels=2
riot_enable=1
riot_overlay_l3_intf_mem_size=8192
riot_overlay_l3_egress_mem_size=32768
riot_overlay_ecmp_resilient_hash_size=16384
The three riot_overlay_* sizes reserve router interfaces, next hops and
resilient-hash entries for the overlay out of the shared L3 tables; the
underlay gets less.
All table variables are in the table variable reference.