Skip to content

Commit ca9a2d6

Browse files
committed
Add pre step to change counterpoll port interval to 2000 in golden config
Added a step to update the counterpoll port interval to 2000 as agreed, to improve slowness observed in nexthop group and member programming This is a WA and it should be reverted after SAI implement a new feature to optimize the counter polling Change-Id: I345a2e8cc60f54bfbe831efec32331bb35c859c8 Signed-off-by: echuawu <[email protected]>
1 parent de7f51b commit ca9a2d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ansible/library/generate_golden_config_db.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __init__(self):
6767
self.macsec_profile = self.module.params['macsec_profile']
6868
self.num_asics = self.module.params['num_asics']
6969
self.hwsku = self.module.params['hwsku']
70+
self.platform, _ = device_info.get_platform_and_hwsku()
7071

7172
self.vm_configuration = self.module.params['vm_configuration']
7273
self.is_light_mode = self.module.params['is_light_mode']
@@ -144,6 +145,11 @@ def generate_full_lossy_golden_config_db(self):
144145
golden_config_db["DEVICE_METADATA"]["localhost"]["default_pfcwd_status"] = "disable"
145146
golden_config_db["DEVICE_METADATA"]["localhost"]["buffer_model"] = "traditional"
146147

148+
# set counterpoll interval to 2000ms as workaround for Slowness observed in nexthop group and member programming
149+
if "FLEX_COUNTER_TABLE" in ori_config_db and 'sn5640' in self.platform:
150+
golden_config_db["FLEX_COUNTER_TABLE"] = ori_config_db["FLEX_COUNTER_TABLE"]
151+
golden_config_db["FLEX_COUNTER_TABLE"]["PORT"]["POLL_INTERVAL"] = "2000"
152+
147153
return json.dumps(golden_config_db, indent=4)
148154

149155
def check_version_for_bmp(self):

0 commit comments

Comments
 (0)