SAI-specific variables

Variables read by the Broadcom SAI itself rather than the SDK. They live in the same config.bcm file. Most select a SAI policy or a resource budget that the SAI reports to SONiC; they do not change the size of a hardware table.

Set in several SONiC Trident 3 HWSKU files: sai_brcm_sonic_acl_enhancements, sai_brcm_sonic_trap_group, sai_eapp_config_file, sai_fast_convergence_support, sai_fdb_entry_l2_discard_src_enable, sai_interface_type_auto_detect, sai_load_hw_config, sai_mdio_access_clause22, sai_nbr_bcast_ifp_optimized, sai_optimized_mmu, sai_pfc_defaults_disable, sai_postinit_cmd_file, sai_preinit_cmd_file, sai_stats_support_mask, sai_tunnel_support, sai_tunnel_underlay_route_mode, sai_verify_incoming_chksum.

sai_200g_4_rsfec_mode_def_544
Type:
number
Default:
0

Use RS-544 by default for 200G 4-lane ports.

sai_acl_qset_optimization
Type:
number
Default:
0

Build smaller field-processor qualifier sets for ACL tables, so more tables fit.

sai_acl_redir_nexthop_use_l3_switch
Type:
number
Default:
0

Implement ACL redirect-to-next-hop with an L3 switch action.

sai_adj_mirror_drops_if_port_and_queue
Type:
number
Default:
0

Account mirror drops in the port and queue drop counters.

sai_adjust_acl_drop_in_rx_drop
Type:
number
Default:
0

Count packets dropped by an ingress ACL in the port’s receive-drop counter.

SONiC:

set in 2 Trident 3 HWSKU files; 1

sai_adjust_acl_drop_out_tx_drop
Type:
number
Default:
0

Count packets dropped by an egress ACL in the port’s transmit-drop counter.

sai_adjust_port_if_in_discards
Type:
number
Default:
0

Adjust the port IF_IN_DISCARDS counter to include further drop reasons.

sai_api_log_enable
Type:
number
Default:
0

Log SAI API calls to an in-memory buffer.

sai_api_log_mem_size
Type:
number
Default:
4194304

Size in bytes of the SAI API log buffer.

sai_async_fdb_nbr_enable
Type:
number
Default:
0

Process FDB and neighbour changes asynchronously.

sai_brcm_sonic_acl_enhancements
Type:
number
Default:
0

Enable ACL behaviour tailored to SONiC (for example how ACL tables share field-processor groups).

SONiC:

set in 5 Trident 3 HWSKU files; 1

sai_brcm_sonic_trap_group
Type:
number
Default:
0

Create host-interface traps in the way SONiC’s trap groups expect.

SONiC:

set in 6 Trident 3 HWSKU files; 1

sai_bypass_nh_fwd_count_check
Type:
number
Default:
0

Skip the next-hop reference-count check.

sai_common_hash_crc
Type:
number
Default:
0

Use one CRC hash configuration for ECMP and LAG.

sai_cos_tc_to_q_map_invert
Type:
number
Default:
1

Invert the default traffic-class to queue map.

sai_cpu_drop_mirror_queue
Type:
number
Default:
0

CPU queue that receives drop-mirrored packets.

sai_cpu_mirror_queue
Type:
number
Default:
0

CPU queue that receives mirrored packets.

sai_cpu_port_static_move_drop
Type:
number
Default:
0

Drop packets whose source MAC is statically bound to the CPU port when they arrive on another port.

sai_cpu_queue_stats_mode
Type:
number
Default:
0

How CPU queue statistics are collected.

sai_create_dflt_trap
Type:
number
Default:
0

Create the SAI’s default trap at start-up.

sai_crm_hw_nh_group_cnt
Type:
number
Default:
0

Next-hop group count reported to SONiC’s resource monitor.

sai_crm_hw_nh_group_member_cnt
Type:
number
Default:
0

Next-hop group member count reported to SONiC’s resource monitor.

sai_custom_init_profile
Type:
number
Default:
0

Select a custom SAI initialisation profile.

sai_default_cpu_tx_tc
Type:
number
Default:
0

Traffic class of packets sent by the CPU without one.

sai_default_tc_to_pg_map
Type:
number
Default:
0

Install a default traffic-class to priority-group map on every port.

sai_dis_ctr_incr_on_port_ln_dn
Type:
number
Default:
0

Do not count packets on a port while its link is down.

sai_disable_internal_port_serdes
Type:
number
Default:
0

Power down the SerDes of internal (loopback, recycle) ports.

sai_disable_ports_when_sw_shutdown
Type:
number
Default:
0

Disable all ports when the switch is shut down.

sai_disable_srcmacqedstmac_ctrl
Type:
number
Default:
0

Do not drop packets whose source MAC equals the destination MAC.

sai_dpb_port_map_static
Type:
number
Default:
0

Keep the port map static across dynamic port breakout.

sai_eapol_trap_use_bcast_mac
Type:
number
Default:
0

Match EAPOL traps on the broadcast MAC as well as the PAE group address.

sai_eapp_config_file
Type:
string

JSON file describing the embedded applications (flow tracker, IFA, BFD firmware) the SAI loads. SONiC files point to /etc/broadcom/eapps_cfg.json.

SONiC:

set in 14 Trident 3 HWSKU files; /etc/broadcom/eapps_cfg.json

sai_ecmp_default_crc_hash
Type:
number
Default:
0

Use the CRC hash for ECMP by default.

sai_ecmp_group_members_increment
Type:
number
Default:
4

Step by which ECMP group member space grows.

sai_egr_mod_reserved_vlan
Type:
number
Default:
0

VLAN reserved for egress packet modification.

sai_egress_queue_stats_sampling_interval
Type:
number
Default:
250

Sampling interval of egress queue statistics.

sai_encrypted_pfc_enable
Type:
number
Default:
0

Enable PFC frames over MACsec-encrypted links.

sai_eventor_port_lane_base
Type:
number
Default:
unset

First lane of the eventor port.

sai_exclude_inports_qual
Type:
number
Default:
0

Leave the InPorts qualifier out of ACL tables.

sai_fadtmin_offset
Type:
number
Default:
256

Offset added to the minimum dynamic threshold (FADT) of queues.

sai_fast_convergence_support
Type:
number
Default:
0

Enable faster route convergence on link down (pre-programmed next-hop failover).

SONiC:

set in 17 Trident 3 HWSKU files; 1

sai_fdb_entry_l2_discard_src_enable
Type:
number
Default:
0

Drop packets whose source MAC matches a discard FDB entry.

SONiC:

set in 3 Trident 3 HWSKU files; 1

sai_feat_tail_timestamp
Type:
number

Enable tail timestamping for telemetry.

sai_fec_acc_collect_interval
Type:
number
Default:
1

Collection interval of the accumulated FEC counters.

sai_fec_stats_cumulative
Type:
number
Default:
0

Report FEC counters cumulatively instead of since the last read.

sai_field_group_auto_prioritize
Type:
number
Default:
0

Let the SAI order field-processor groups by priority itself.

sai_fld_stats_use_flexctr
Type:
number
Default:
0

Collect field (ACL) statistics with flex counters.

sai_fpem_flexctr_stats_size
Type:
number
Default:
8192

Number of flex counters reserved for exact-match statistics.

sai_global_scoped_rcy_port
Type:
number
Default:
unset

Recycle port shared by all pipes.

sai_host_if_unit_vpp
Type:
number
Default:
1

Host-interface unit for virtual-port packets.

sai_hostif_netif_iff_up_set
Type:
number
Default:
0

Bring host network interfaces administratively up when they are created.

SONiC:

set in 1 Trident 3 HWSKU file; 1

sai_hostif_trap_types_arp_needed
Type:
number
Default:
1

Install the ARP traps the host interface needs by default.

sai_hw_encrypted_pfc_enable
Type:
number
Default:
0

Enable hardware PFC over MACsec-encrypted links.

sai_ifa2_cosq_stats_invalid_value
Type:
number
Default:
524287

Value reported for an unavailable queue statistic in IFA 2.0 metadata.

sai_ifa_config
Type:
string

IFA configuration string (loopback ports and parameters).

sai_ifacc_config
Type:
string

IFA collector configuration string.

sai_ifp_enable_on_cpu_tx
Type:
number
Default:
0

Apply ingress field-processor rules to packets sent by the CPU.

sai_instru_stat_accum_enable
Type:
number
Default:
0

Accumulate instrumentation statistics in software.

sai_interface_type_auto_detect
Type:
number
Default:
1

Set a port’s interface type from the detected transceiver. Several SONiC Trident 3 files set 0.

SONiC:

set in 4 Trident 3 HWSKU files; 0

sai_ip_counter_cstats
Type:
number
Default:
0

Collect IP counters with the CSTATS engine.

sai_ipv6_flow_label_support
Type:
number
Default:
0

Include the IPv6 flow label in hashing.

sai_l2_cpu_fdb_event_suppress
Type:
number
Default:
0

Do not send FDB events for entries pointing to the CPU.

sai_l2pt_feature_support
Type:
number
Default:
0

Enable L2 protocol tunnelling.

sai_l3_byte1_udf_disable
Type:
number
Default:
0

Do not reserve the UDF used for the second byte of the L3 header.

sai_l3_max_ecmp_groups
Type:
number

Number of ECMP groups the SAI reports and allows.

sai_l3_max_ecmp_paths
Type:
number
Default:
64

Maximum number of members per ECMP group the SAI allows.

sai_l3_max_ipv4_neighbors
Type:
number
Default:
6144

IPv4 neighbour count the SAI reports.

sai_l3_max_ipv4_routes
Type:
number
Default:
1048576

IPv4 route count the SAI reports to SONiC’s resource monitor.

sai_l3_max_ipv6_neighbors
Type:
number
Default:
2560

IPv6 neighbour count the SAI reports.

sai_l3_max_ipv6_routes
Type:
number
Default:
1048576

IPv6 route count the SAI reports to SONiC’s resource monitor.

sai_l3_max_nexthops
Type:
number
Default:
16384

Next-hop count the SAI reports.

sai_l3_max_vrfs
Type:
number
Default:
32

Number of VRFs the SAI allows.

sai_l3_neighbor_discard_flag_capable
Type:
number
Default:
1

Program neighbour drops with the hardware discard flag.

sai_l3_route_discard_flag_capable
Type:
number
Default:
1

Program route drops with the hardware discard flag.

sai_l3_route_table_db_type
Type:
number
Default:
1

Data structure the SAI uses for its route database.

sai_lag_default_crc_hash
Type:
number
Default:
0

Use the CRC hash for LAG by default.

sai_led_ploc_mode
Type:
number
Default:
0

Port-locator LED mode.

sai_legacy_ledproc_linkscan_cb
Type:
number
Default:
1

Update the LED processor from the link-scan callback (legacy LED firmware).

sai_load_hw_config
Type:
string

Directory with the Cancun (flex pipeline) package the SAI loads at start-up, for example /usr/lib/cancun/ or a versioned /etc/bcm/flex/bcm56870_a0_premium_issu/…/ directory. Without it the SAI uses its built-in default.

SONiC:

set in 27 Trident 3 HWSKU files; /etc/bcm/flex/bcm56870_a0_premium_issu/b870.6.4.1/, /usr/lib/cancun/, /usr/share/sonic/platform/cancun/sdk6.5.24/

sai_mac_policy_vfp_group
Type:
number
Default:
1

Create the VLAN field-processor group used for MAC-based policies.

sai_macro_flow_based_hash
Type:
number
Default:
0

Use macro-flow based hashing for ECMP.

sai_macsec_egr_btr_hw_config
Type:
number
Default:
0

MACsec egress hardware configuration.

sai_max_counters
Type:
number
Default:
0

Maximum number of flex counters the SAI allocates.

sai_mdio_access_clause22
Type:
number
Default:
0

Use clause 22 for SAI MDIO accesses. Set to 1 in some SONiC Trident 3 files.

Forms:

sai_mdio_access_clause22_<N>

SONiC:

set in 3 Trident 3 HWSKU files; 1

sai_mdio_access_clause45
Type:
number
Default:
0

Use clause 45 for SAI MDIO accesses.

sai_misc_group_priority
Type:
number

Priority of the SAI’s miscellaneous field-processor group.

sai_mmu_custom_config
Type:
number
Default:
0

Use a custom MMU configuration instead of the SAI’s default buffer set-up.

sai_mmu_lossless_pool_qe_shared_limit
Type:
number
Default:
3126

Shared limit of the lossless pool’s queue-entry resources.

sai_mmu_lossy_pool_qe_shared_limit
Type:
number
Default:
12500

Shared limit of the lossy pool’s queue-entry resources.

sai_mmu_max_buffer_profiles
Type:
number
Default:
32

Maximum number of buffer profiles the SAI accepts.

sai_mmu_mod_queue_number
Type:
number

Queue used for mirror-on-drop packets.

sai_mmu_mod_queue_number_ipep
Type:
number
Default:
unset

Queue used for mirror-on-drop packets dropped in the pipeline.

sai_mmu_mod_queue_number_mmu
Type:
number
Default:
unset

Queue used for mirror-on-drop packets dropped in the MMU.

sai_mmu_qgroups_default
Type:
number
Default:
0

Create default queue groups.

sai_mmu_reset_hdrm_on_create
Type:
number
Default:
1

Reset priority-group headroom when a buffer profile is created.

sai_mmu_tc_to_pg_config
Type:
number
Default:
0

Program the traffic-class to priority-group map from the SAI’s MMU configuration.

SONiC:

set in 1 Trident 3 HWSKU file; 1

sai_mod_pkt_eventor_header_enable
Type:
number
Default:
0

Add the eventor header to mirror-on-drop packets.

sai_mptnl_use_tunnel_underlay_port_rif
Type:
number
Default:
0

Use the underlay port’s router interface for tunnel next hops.

sai_multi_rif_supported
Type:
number
Default:
0

Allow several router interfaces on one port.

sai_nbr_bcast_ifp_optimized
Type:
number
Default:
0

Use fewer ingress field-processor entries for neighbour (ARP/ND) broadcast traps.

SONiC:

set in 9 Trident 3 HWSKU files; 1, 2

sai_nos_reserved_l3_encap_range_begin
Type:
number
Default:
unset

First L3 encapsulation index reserved for the network operating system.

sai_nos_reserved_l3_encap_range_end
Type:
number
Default:
unset

Last L3 encapsulation index reserved for the network operating system.

sai_ocb_fc_config
Type:
number
Default:
0

On-chip buffer flow-control configuration.

sai_optimize_acl_ipv6_addr_qual
Type:
number
Default:
1

Use a compressed IPv6 address qualifier in ACL tables.

sai_optimized_mmu
Type:
number
Default:
0

Use the SAI’s optimised MMU defaults. Set to 1 in several SONiC Trident 3 files.

SONiC:

set in 7 Trident 3 HWSKU files; 1

sai_ospfv3_ipsec_trap
Type:
number
Default:
0

Trap OSPFv3 packets carried in IPsec to the CPU.

sai_parent_subport_rif_intf_support
Type:
number
Default:
0

Allow a router interface on a parent port that also has sub-port interfaces.

sai_pfc_defaults_disable
Type:
number
Default:
0

Do not program the SAI’s default PFC settings.

SONiC:

set in 4 Trident 3 HWSKU files; 1

sai_pfc_dlr_init_capability
Type:
number

Advertise PFC deadlock-recovery capability at start-up.

SONiC:

set in 2 Trident 3 HWSKU files; 1' -%}

sai_phy_an_mode_c73
Type:
number
Default:
0

Auto-negotiation mode the SAI uses for clause 73.

sai_pkt_dscp_modification_disable
Type:
number
Default:
0

Do not rewrite DSCP on egress.

sai_port_attr_pvid_config
Type:
number
Default:
1

Allow the port VLAN ID to be set through the port attribute.

sai_port_default_burst_size
Type:
number
Default:
1024

Default burst size of port shapers and policers.

sai_port_gearbox
Type:
number
Default:
0

Ports are connected through an external gearbox.

Forms:

sai_port_gearbox_<port>, sai_port_gearbox_<type>, sai_port_gearbox

sai_port_ip_byte_stat
Type:
number
Default:
0

Collect per-port IP byte counters.

sai_port_pg_lossless_config
Type:
number
Default:
0

Configure default lossless priority groups on ports.

sai_port_phy_time_sync_en
Type:
number
Default:
0

Enable PHY-based time synchronisation on ports.

sai_port_pmap_phy_lanes
Type:
number
Default:
0

Take a port’s PHY lanes from the port map.

sai_port_queue_ecn_counter
Type:
number
Default:
0

Collect per-queue ECN-marked counters.

sai_postinit_cmd_file
Type:
string

Diag-shell script the SAI runs after the SDK is initialised on a cold start.

SONiC:

set in 4 Trident 3 HWSKU files; /usr/share/sonic/hwsku/sai_postinit_cmd.soc, /usr/share/sonic/platform/postinit_cmd_file.soc

sai_postinit_warmboot_cmd_file
Type:
string

As sai_postinit_cmd_file, for a warm start.

sai_preinit_cmd_file
Type:
string

Diag-shell script the SAI runs during a cold start, just before init misc. Dell S5232F files use it to load the LED firmware with m0.

SONiC:

set in 11 Trident 3 HWSKU files; /usr/share/sonic/hwsku/sai_preinit_cmd.soc, /usr/share/sonic/platform/preinit_cmd_file.soc

sai_preinit_warmboot_cmd_file
Type:
string

As sai_preinit_cmd_file, for a warm start.

sai_ptp_firmware_type
Type:
number
Default:
0

Which PTP firmware the SAI loads.

sai_rcy_enable_on_cpu_tx
Type:
number
Default:
0

Allow packets sent by the CPU to be recirculated.

sai_rdma_udf_disable
Type:
number
Default:
0

Do not reserve the UDF used for RDMA (RoCE) fields.

sai_recycle_port_lane_base
Type:
number
Default:
unset

First lane of the recycle port.

sai_remap_prio_on_tnl_egress
Type:
number
Default:
0

Remap packet priority when a packet leaves a tunnel.

sai_retain_mmu_settings_on_speed_change
Type:
number
Default:
1

Keep a port’s buffer settings when its speed changes.

sai_retry_fdb_delete
Type:
number
Default:
0

Retry FDB deletes that fail.

sai_skip_create_sys_efp_grp
Type:
number
Default:
0

Do not create the SAI’s system egress field-processor group.

sai_sonic_use_route_max
Type:
number
Default:
0

Report the maximum route count to SONiC’s resource monitor instead of the currently available count.

sai_stats_disable_mask
Type:
number
Default:
0

Bit mask of statistics the SAI does not collect.

sai_stats_support_mask
Type:
number
Default:
0

Bit mask of optional statistics the SAI supports. Set to 0x1 in several SONiC Trident 3 files.

SONiC:

set in 6 Trident 3 HWSKU files; 0x1

sai_suspend_on_error
Type:
number
Default:
0

Stop the SAI on an internal error, for debugging.

sai_svi_my_station_optimization
Type:
number
Default:
0

Share station (router MAC) entries between VLAN interfaces.

sai_swap_transport_tag_support
Type:
number
Default:
0

Allow swapping the transport VLAN tag.

sai_switch_ecc_event_throttle
Type:
number
Default:
0

Throttle ECC (soft-error) events reported to SONiC.

sai_switch_mac_tnl_term_enable
Type:
number
Default:
0

Terminate tunnels addressed to the switch MAC.

sai_switch_pcie_hotswap_disable
Type:
number
Default:
255

Disable PCIe hot-swap handling.

sai_tc_based_queue_stats_enable
Type:
number
Default:
1

Report queue statistics per traffic class.

sai_tc_mirror_buffer_shared
Type:
number
Default:
0

Let mirrored traffic use the shared buffer.

sai_tc_mirror_buffer_size_bytes
Type:
number
Default:
0

Buffer reserved for mirrored traffic, in bytes.

sai_tcam_opt_support_all_rifs_disable
Type:
number
Default:
0

Disable the TCAM optimisation that matches all router interfaces with one rule.

sai_track_objects
Type:
number
Default:
0

Track created SAI objects for debugging.

sai_trap_fp_action_drop_copy_to_cpu
Type:
number
Default:
0

Implement trap actions as drop plus copy-to-CPU.

sai_trap_group_priority
Type:
number

Priority of the field-processor group used for traps.

sai_traps_use_global_efp_group
Type:
number
Default:
1

Put trap-related egress rules in one global egress field-processor group.

sai_trigger_linkscan_remote_local_faults
Type:
number
Default:
1

Let link scan react to remote and local fault states.

sai_tunnel_ecmp_sharing_mode
Type:
number
Default:
0

Whether tunnels share ECMP groups.

sai_tunnel_global_sip_mask_enable
Type:
number
Default:
0

Allow masked source-IP tunnel termination.

sai_tunnel_ipinip_multi_vrf_support
Type:
number
Default:
0

Allow IP-in-IP tunnels in several VRFs.

sai_tunnel_iptnl_scale
Type:
number
Default:
unset

Number of IP-in-IP tunnels the SAI sizes for.

sai_tunnel_support
Type:
number
Default:
0

Enable tunnel (VXLAN, IP-in-IP) support in the SAI. Needed for VXLAN in SONiC.

SONiC:

set in 26 Trident 3 HWSKU files; 1

On Seastone2:

sai_tunnel_support=1

sai_tunnel_underlay_max_path
Type:
number
Default:
0

Maximum ECMP paths for a tunnel’s underlay.

sai_tunnel_underlay_route_mode
Type:
number

How the SAI resolves tunnel underlay routes.

SONiC:

set in 3 Trident 3 HWSKU files; 1

sai_tunnel_vxlan_scale
Type:
number
Default:
1

Select the SAI’s VXLAN scale profile.

sai_tunnel_vxlan_scale_number
Type:
number
Default:
0

Number of VXLAN tunnels the SAI sizes for.

sai_uncached_port_stats
Type:
number
Default:
0

Read port statistics directly from hardware.

sai_uncached_queue_stats
Type:
number
Default:
0

Read queue statistics directly from hardware.

sai_uncached_stats
Type:
number
Default:
0

Read statistics directly from hardware instead of the counter cache.

sai_use_dest_host_hit_variant
Type:
number
Default:
0

Use the destination hit bit of host entries for neighbour aging.

sai_verify_incoming_chksum
Type:
number
Default:
1

Check the IPv4 header checksum of received packets. Some SONiC Trident 3 files set 0.

SONiC:

set in 5 Trident 3 HWSKU files; 0

sai_vfp_enable_on_cpu_tx
Type:
number
Default:
0

Apply VLAN field-processor rules to packets sent by the CPU.

sai_vfp_fragment_l4_hash_disable
Type:
number
Default:
0

Do not hash on L4 ports for IP fragments.

sai_vfp_learn_policy_disable
Type:
number
Default:
0

Do not use the VLAN field processor for MAC-learning policy.

sai_vfp_smac_drop_filter_disable
Type:
number
Default:
0

Do not install the source-MAC drop filter in the VLAN field processor.

sai_vfp_smac_drop_filter_drop_enable
Type:
number
Default:
0

Make the source-MAC filter drop (rather than only mark) matching packets.

sai_vfp_subport_rif_vfp_action_override_disable
Type:
number
Default:
0

Do not override VLAN field-processor actions for sub-port router interfaces.

sai_vlan_counter_alloc_disable
Type:
number
Default:
0

Do not allocate VLAN counters.

sai_voq_wm_latency_enable
Type:
number
Default:
0

Report latency watermarks for virtual output queues.