You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Freeze/Unfreeze of VDM data
Also, VDM statistics are frozen before reading VDM real values, VDM flag values and PM values and are unfrozen after the read operation is completed.
VDM metadata update for VDM flags
All the VDM metadata fields for VDM flags are now being updated. This includes updated the flag change count, last set and last clear time as part of periodic polling by the DomInfoUpdateTask thread.
The change counters and set/clear time tables will be present for only 1 subport for a port breakout group. This has been done inline to future direction wherein the dignostic tables will be maintained only for first subport and not for other subports of the port breakout group.
Other related changes in this PR
Skip reading all diagnostic info if transceiver is not present on a port. This is now done at the beginning of the diagnostic polling loop to optimize the polling routine
Read VDM and PM data only if VDM is supported on a transceiver
The del_port_sfp_dom_info_from_db function has now been modified to make it more generic and to reduce modifying the implementation while adding new tables in future
Moved xcvrd/dom_mgr.py to xcvrd/dom/dom_mgr.py
Modified a warning to debug in handle_port_update_event to reduce flooding of logs
How Has This Been Tested?
Modules tested
CMIS module
C-CMIS module
SFF-8472 module
Test cases attempted
Dumped VDM threshold value tables
Dumped VDM real value tables
Dumped VDM flag value tables
Dumped VDM metadata tables
Ensure all VDM related tables are empty after xcvrd stop
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
VDM data from xcvrd needs to be read and the redis-db needs to be updated accordingly.
Motivation and Context
VDM data from xcvrd needs to be read in the following manner so that the data can be accessed through CLI as well as Streaming telemetry dynamically.
The table and field related details for the above fields can be found in HLD for diagnostic monitoring of CMIS based transceivers by mihirpat1 · Pull Request #1828 · sonic-net/SONiC
Freeze/Unfreeze of VDM data
Also, VDM statistics are frozen before reading VDM real values, VDM flag values and PM values and are unfrozen after the read operation is completed.
VDM metadata update for VDM flags
All the VDM metadata fields for VDM flags are now being updated. This includes updated the flag change count, last set and last clear time as part of periodic polling by the DomInfoUpdateTask thread.
The change counters and set/clear time tables will be present for only 1 subport for a port breakout group. This has been done inline to future direction wherein the dignostic tables will be maintained only for first subport and not for other subports of the port breakout group.
Other related changes in this PR
xcvrd/dom_mgr.py
toxcvrd/dom/dom_mgr.py
handle_port_update_event
to reduce flooding of logsHow Has This Been Tested?
Modules tested
Test cases attempted
Additional Information (Optional)
This PR needs to be merged only after the below PR is merged.
sonic-net/sonic-platform-common#527
MSFT ADO - 30598749