Skip to content

Commit

Permalink
enable fib suppress for leafrouter (sonic-net#17072)
Browse files Browse the repository at this point in the history
Why I did it
Enable the suppress fib feature by default.

Work item tracking
Microsoft ADO (25564723):
How I did it
In minigraph.py, to add the field suppress-fib-pending, and enable it for leafrouter.

How to verify it
Build / load image and check the config_db by show CLI.
admin@str-7260cx3-acs-2:~$ show suppress-fib-pending
Enabled

Need to modify the tests/bgp/test_bgp_suppress_fib.py in sonic-mgmt repo, to check the config before restore. Otherwise, after this test, it will turn off the suppress-fib-pending.
sonic-net/sonic-mgmt#10612
  • Loading branch information
StormLiangMS authored Nov 3, 2023
1 parent 7013b05 commit 183ee7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
console_device_types = ['MgmtTsToR']
dhcp_server_enabled_device_types = ['BmcMgmtToRRouter']
mgmt_device_types = ['BmcMgmtToRRouter', 'MgmtToRRouter', 'MgmtTsToR']
leafrouter_device_types = ['LeafRouter']

# Counters disabled on management devices
mgmt_disabled_counters = ["BUFFER_POOL_WATERMARK", "PFCWD", "PG_DROP", "PG_WATERMARK", "PORT_BUFFER_DROP", "QUEUE", "QUEUE_WATERMARK"]
Expand Down Expand Up @@ -2113,6 +2114,10 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
if current_device and current_device['type'] in mgmt_device_types:
results["FLEX_COUNTER_TABLE"] = {counter: {"FLEX_COUNTER_STATUS": "disable"} for counter in mgmt_disabled_counters}

# Enable bgp-suppress-fib by default for leafrouter
if current_device and current_device['type'] in leafrouter_device_types:
results['DEVICE_METADATA']['localhost']['suppress-fib-pending'] = 'enabled'

return results

def get_tunnel_entries(tunnel_intfs, tunnel_intfs_qos_remap_config, lo_intfs, tunnel_qos_remap, mux_tunnel_name, peer_switch_ip):
Expand Down

0 comments on commit 183ee7d

Please sign in to comment.