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

Add diagnostic monitoring APIs for DOM, VDM and status access for CMIS modules #515

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

mihirpat1
Copy link
Contributor

@mihirpat1 mihirpat1 commented Nov 14, 2024

Description

We need to add DOM, VDM and status related APIs to be inline with the changes proposed via the below HLD
HLD for diagnostic monitoring of CMIS based transceivers by mihirpat1 · Pull Request #1828 · sonic-net/SONiC (github.com)

Motivation and Context

  1. Moved definition of VDM freeze and unfreeze related APIs from c_cmis.py to cmis.py
  2. Modified get_vdm_allpage to ensure that None is returned if module does not support VDM. Previously, the functions was checking for vdm group advertisement (page 2fh, byte 128.1:0) instead of checking for VDM pages supported (page 1h, byte 142.6)
  3. Defined the following for CMIS transceivers
    a. get_transceiver_dom_flags
    b. get_transceiver_vdm_real_value
    c. get_transceiver_vdm_thresholds
    d. get_transceiver_vdm_flags
    e. get_transceiver_status_flags

How Has This Been Tested?

Tested the changes on the following types of transceivers

  1. CMIS based transceiver
  2. C-CMIS based transceiver
  3. CMIS based transceivers without VDM advertised by the module

Additional Information (Optional)

MSFT ADO - 30215715

@mihirpat1 mihirpat1 marked this pull request as ready for review November 14, 2024 07:43
@mihirpat1 mihirpat1 requested a review from prgeor November 14, 2024 07:43
@mihirpat1
Copy link
Contributor Author

@prgeor @qinchuanares Can you please help in reviewing this?

========================================================================
"""
vdm_real_value_dict = dict()
vdm_raw_dict = self.get_vdm(self.vdm.VDM_REAL_VALUE)
Copy link
Contributor

@qinchuanares qinchuanares Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we perform VDM 1) freeze 2) read and 3) unfreeze to update min/max/avg statistical values?

Copy link
Contributor Author

@mihirpat1 mihirpat1 Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qinchuanares We plan to perform freeze and unfreeze operation at the caller side (from xcvrd).
@prgeor Please correct me if my understanding is incorrect.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mihirpat1 that is correct

prgeor
prgeor previously approved these changes Nov 14, 2024
@prgeor prgeor merged commit 9fc9c85 into sonic-net:master Nov 15, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants