-
Notifications
You must be signed in to change notification settings - Fork 165
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
Enable periodic polling of TRANSCEIVER_FIRMWARE_INFO table in DomInfoUpdateTask #443
Conversation
…UpdateTask Signed-off-by: Mihir Patel <patelmi@microsoft.com>
@keboliu can you review |
@@ -530,8 +531,15 @@ def post_port_sfp_firmware_info_to_db(logical_port_name, port_mapping, table, | |||
continue | |||
|
|||
try: | |||
transceiver_firmware_info_dict = _wrapper_get_transceiver_firmware_info(physical_port) | |||
if transceiver_firmware_info_dict is not None: | |||
if firmware_info_cache is not None and physical_port in firmware_info_cache: |
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.
@mihirpat1 what is this optimization? My understanding is the dom is going to read the firmware version from the EEPROM every polling interval
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.
@prgeor - Upon further looking into the code after our discussion, I found that the current code reads data from EERPOM for the first subport for every poll. However, the remaining subports of that physical port in that iteration have their data retrieved from the relevant cache.
In the current case, the firmware_info_cache is a dictionary with physical_port
as the key. Hence, DomInfoUpdateTask will clear the entire firmware_info_cache dictionary (line 1642) before it starts retrieving data for all ports. While handling the first subport of a physical port, DomInfoUpdateTask will read data from EEPROM and update firmware_info_cache. All other subports of the physical ports will have the data retrieved from firmware_info_cache in that iteration.
…platform-daemons into fw_info_periodic_update
…UpdateTask (sonic-net#443) * Enable periodic polling of TRANSCEIVER_FIRMWARE_INFO table in DomInfoUpdateTask Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Addressed testcase failure * Renamed dom_status to dom_polling --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
@StormLiangMS - I have created the below PR for 202305 cherry-pick. It will be great if you can help in merging it. MSFT ADO - 26801871 |
…UpdateTask (sonic-net#443) * Enable periodic polling of TRANSCEIVER_FIRMWARE_INFO table in DomInfoUpdateTask Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Addressed testcase failure * Renamed dom_status to dom_polling --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
Cherry-pick PR to 202311: #448 |
…UpdateTask (#443) * Enable periodic polling of TRANSCEIVER_FIRMWARE_INFO table in DomInfoUpdateTask Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Addressed testcase failure * Renamed dom_status to dom_polling --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
…UpdateTask (sonic-net#443) * Enable periodic polling of TRANSCEIVER_FIRMWARE_INFO table in DomInfoUpdateTask Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Addressed testcase failure * Renamed dom_status to dom_polling --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
MSFT ADO - 26801871
Description
We need to enable periodic update of TRANSCEIVER_FIRMWARE_INFO table so that the active_firmware and inactive_firmware fields are periodically updated in the redis-db. Periodic polling of firmware version will enable XCVRD to update firmware version for all breakout ports of a physical port after performing firmware upgrade using any one of the breakout port.
Also, a new CLI (
config interface transceiver dom PORT_NAME enable/disable
) has been created to allow user enable/disable DOM monitoring. XCVRD needs to handle this CLI so that periodic polling through DomInfoUpdateTask thread is enabled/disabled for a particular port.The new CLI will set
dom_polling
field in PORT|<logical_port> table of CONFIG_DB. The possible values of this field areenabled
anddisabled
Please refer to sonic-net/sonic-utilities#3187 for further details.
Note for DOM config CLI execution on breakout ports
While handling the first subport of a physical port, DomInfoUpdateTask thread will read data from EEPROM and update firmware_info_cache. All other subports of the physical ports will have the data retrieved from firmware_info_cache in that iteration. Hence, we need to ensure that user always disables DOM monitoring through the CLI only for the first subport (even though, the user is accessing CDB commands using subport > 1).
DOM monitoring should be disabled before executing
sfputil show fwversion PORT_NAME
to ensure that DomInfoUpdateTask thread does not send a CDB command parallelly to retrieve the FW version.Motivation and Context
How Has This Been Tested?
Following are the testcases which were tested and passed successfully
Additional Information (Optional)