-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mellanox] update asic and module temperature in a thread for CMIS management #16955
[Mellanox] update asic and module temperature in a thread for CMIS management #16955
Conversation
@prgeor kindly reminder to review this PR |
Can we add a HLD to describe how would this thread work? |
@Junchao-Mellanox Module temperature is already read by Xcvrd DOM thread so why not use that? |
Hi Prince, thanks for the comments. DOM info is updated every 1 minutes. However, this get_temperature function might be called at any time. So, we decided to have implementation not from DB. |
@@ -785,6 +791,77 @@ def get_tx_fault(self): | |||
api = self.get_xcvr_api() | |||
return [False] * api.NUM_CHANNELS if api else None | |||
|
|||
def get_temperature(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Junchao-Mellanox why we need this thread to read the optics temperature when the same is available in TRANSCEIVER_DOM_SENSOR table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Prince, thanks for the comments. DOM info is updated every 1 minutes. However, this get_temperature function might be called at any time. So, we decided to have implementation not from DB.
if not api: | ||
return None | ||
|
||
thresh_support = api.get_transceiver_thresholds_support() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Junchao-Mellanox thresholds are available in TRANSCEIVER_DOM_THRESHOLD table why read again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Prince, thanks for the comments. DOM info is updated every 1 minutes. However, this get_temperature function might be called at any time. So, we decided to have implementation not from DB.
Hi @prgeor, could you please review again? |
…nagement (sonic-net#16955) - Why I did it When module is totally under software control, driver cannot get module temperature/temperature threshold from firmware. In this case, sonic needs to get temperature/temperature threshold from EEPROM. In this PR, a thread thermal updater is created to update module temperature/temperature threshold while software control is enabled. - How I did it Query ASIC temperature from SDK sysfs and update hw-management-tc periodically Query Module temperature from EEPROM and update hw-management-tc periodically - How to verify it Manual test New Unit tests
…r CMIS management (sonic-net#16955) - Why I did it When module is totally under software control, driver cannot get module temperature/temperature threshold from firmware. In this case, sonic needs to get temperature/temperature threshold from EEPROM. In this PR, a thread thermal updater is created to update module temperature/temperature threshold while software control is enabled. - How I did it Query ASIC temperature from SDK sysfs and update hw-management-tc periodically Query Module temperature from EEPROM and update hw-management-tc periodically - How to verify it Manual test New Unit tests
…r CMIS management (#16955) (#17699) - Why I did it When module is totally under software control, driver cannot get module temperature/temperature threshold from firmware. In this case, sonic needs to get temperature/temperature threshold from EEPROM. In this PR, a thread thermal updater is created to update module temperature/temperature threshold while software control is enabled. - How I did it Query ASIC temperature from SDK sysfs and update hw-management-tc periodically Query Module temperature from EEPROM and update hw-management-tc periodically - How to verify it Manual test New Unit tests
Why I did it
When module is totally under software control, driver cannot get module temperature/temperature threshold from firmware. In this case, sonic needs to get temperature/temperature threshold from EEPROM. In this PR, a thread thermal updater is created to update module temperature/temperature threshold while software control is enabled.
Work item tracking
How I did it
Query ASIC temperature from SDK sysfs and update hw-management-tc periodically
Query Module temperature from EEPROM and update hw-management-tc periodically
How to verify it
Manual test
New unit tests
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)