Skip to content

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

Merged
prgeor merged 3 commits intosonic-net:masterfrom
mihirpat1:diag_apis_for_cmis
Nov 15, 2024
Merged

Add diagnostic monitoring APIs for DOM, VDM and status access for CMIS modules#515
prgeor merged 3 commits intosonic-net:masterfrom
mihirpat1:diag_apis_for_cmis

Conversation

@mihirpat1
Copy link
Copy Markdown
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

…S modules

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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