Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/mellanox_buffer_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,12 @@ def mlnx_flush_new_buffer_configuration(self):
if not self.ready:
return True

if not self.is_buffer_config_default and not self.is_buffer_config_empty or self.is_default_traditional_model:
metadata = self.configDB.get_entry('DEVICE_METADATA', 'localhost')
already_dynamic = metadata.get('buffer_model') == 'dynamic' and not self.is_default_traditional_model

if (not self.is_buffer_config_default and not self.is_buffer_config_empty
or self.is_default_traditional_model) and not already_dynamic:
log.log_notice("No item pending to be updated")
metadata = self.configDB.get_entry('DEVICE_METADATA', 'localhost')
metadata['buffer_model'] = 'traditional'
self.configDB.set_entry('DEVICE_METADATA', 'localhost', metadata)
log.log_notice("Set buffer_model as traditional")
Expand Down
Loading