Skip to content
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

[xcvrd] Enable periodic polling of VDM relevant data #582

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mihirpat1
Copy link
Contributor

@mihirpat1 mihirpat1 commented Dec 24, 2024

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.

  1. VDM threshold values should be read during transceiver detection. We don't need to poll this data periodically since the threshold values are static
  2. VDM real/sample values and VDM flag values should be read periodically by the DomInfoUpdateTask thread

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

  1. 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
  2. Read VDM and PM data only if VDM is supported on a transceiver
  3. 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

How Has This Been Tested?

Modules tested

  1. CMIS module
  2. C-CMIS module
  3. SFF-8472 module

Test cases attempted

  1. Dumped VDM threshold value tables
  2. Dumped VDM real value tables
  3. Dumped VDM flag value tables
  4. Dumped VDM metadata tables
  5. Ensure all VDM related tables are empty after xcvrd stop

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

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mihirpat1 mihirpat1 added the xcvrd label Jan 7, 2025
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants