Skip to content

[action] [PR:750] [xcvrd] Separate VDM basic and statistic observables#753

Merged
mssonicbld merged 1 commit intosonic-net:202511from
mssonicbld:cherry/202511/750
Feb 19, 2026
Merged

[action] [PR:750] [xcvrd] Separate VDM basic and statistic observables#753
mssonicbld merged 1 commit intosonic-net:202511from
mssonicbld:cherry/202511/750

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

This PR must be merged along with sonic-net/sonic-platform-common#624

Description

Currently, xcvrd performs freeze operation before reading ALL VDM observables,
then unfreezes after reading. This approach has following limitations:

  1. Modules supporting only basic VDM observables (instantaneous values) may not
    support freeze/unfreeze functionality
  2. Freeze operations are expensive and unnecessary for basic observables

Motivation and Context

This PR restructures the VDM monitoring flow in DOM manager to optimize freeze
operations and correctly handle different observable types.

CHANGES IMPLEMENTED:

  1. Three-Step VDM Monitoring Flow (dom/dom_mgr.py)

    Step 1: Conditional Freeze for Statistics/PM (only if NOT in lpmode)

    • Check: need_freeze = vdm_statistic_supported AND not_lpmode
    • If need_freeze:
      a) Freeze VDM/PM statistics
      b) Read VDM statistic observables (if supported)
      c) Read PM data
      d) Unfreeze VDM/PM statistics

    Step 2: Read VDM Basic Observables

    • Always read, no freeze needed
    • Works even in lpmode
    • get_vdm_real_values_basic() → instantaneous values
    • Merged with statistic observables from Step 1

    Step 3: Post Merged Data to DB, then Read COR Flags

    • Post combined basic + statistic observables to DB
    • Read COR flags last (ensures statistics captured before flags clear)

How Has This Been Tested?

Following tests were executed to ensure that the VDM related tables are updated in line with expectation

  1. Optic supporting only VDM basic observables
  2. Optic supporting both VDM basic and statistic observables
  3. Optic supporting both VDM basic and statistic observables + CCMIS optic
  4. Optics not supporting VDM and PM (800G LPO optics)
  5. While module is in lpmode, ensure that the VDM statistical observables are not being updated
  • Please note that the last_update_time timestamp will be updated as VDM basic observables would still be periodically updated while the transceiver is in low power mode
  1. While CCMIS module is in lpmode, ensure that the VDM statistical observables + PM data is not being updated
  2. Flat memory optics
  3. Test SFP OIR
    a. Swap CCMIS optic with non-VDM supported optic
    b. Swap non-VDM supported optic with DAC
    c. Swap DAC with CCMIS optic

Additional Information (Optional)

MSFT ADO - 34227059

<!-- Provide a general summary of your changes in the Title above -->
This PR must be merged along with sonic-net/sonic-platform-common#624

#### Description
<!--
     Describe your changes in detail
-->
Currently, xcvrd performs freeze operation before reading ALL VDM observables,
then unfreezes after reading. This approach has following limitations:

1. Modules supporting only basic VDM observables (instantaneous values) may not
   support freeze/unfreeze functionality
2. Freeze operations are expensive and unnecessary for basic observables

#### Motivation and Context
<!--
     Why is this change required? What problem does it solve?
     If this pull request closes/resolves an open Issue, make sure you
     include the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here
-->
This PR restructures the VDM monitoring flow in DOM manager to optimize freeze
operations and correctly handle different observable types.

CHANGES IMPLEMENTED:

1. Three-Step VDM Monitoring Flow (dom/dom_mgr.py)
   ------------------------------------------------

   Step 1: Conditional Freeze for Statistics/PM (only if NOT in lpmode)
   - Check: need_freeze = vdm_statistic_supported AND not_lpmode
   - If need_freeze:
       a) Freeze VDM/PM statistics
       b) Read VDM statistic observables (if supported)
       c) Read PM data
       d) Unfreeze VDM/PM statistics

   Step 2: Read VDM Basic Observables
   - Always read, no freeze needed
   - Works even in lpmode
   - get_vdm_real_values_basic() → instantaneous values
   - Merged with statistic observables from Step 1

   Step 3: Post Merged Data to DB, then Read COR Flags
   - Post combined basic + statistic observables to DB
   - Read COR flags last (ensures statistics captured before flags clear)

#### How Has This Been Tested?
<!--
     Please describe in detail how you tested your changes.
     Include details of your testing environment, and the tests you ran to
     see how your change affects other areas of the code, etc.
-->
Following tests were executed to ensure that the VDM related tables are updated in line with expectation

1. Optic supporting only VDM basic observables
2. Optic supporting both VDM basic and statistic observables
3. Optic supporting both VDM basic and statistic observables + CCMIS optic
4. Optics not supporting VDM and PM (800G LPO optics)
5. While module is in lpmode, ensure that the VDM statistical observables are not being updated
 - Please note that the last_update_time timestamp will be updated as VDM basic observables would still be periodically updated while the transceiver is in low power mode
6. While CCMIS module is in lpmode, ensure that the VDM statistical observables + PM data is not being updated
7. Flat memory optics
8. Test SFP OIR
  a. Swap CCMIS optic with non-VDM supported optic
  b. Swap non-VDM supported optic with DAC
  c. Swap DAC with CCMIS optic

#### Additional Information (Optional)
MSFT ADO - 34227059
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #750

@mssonicbld
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit e23750e into sonic-net:202511 Feb 19, 2026
5 of 6 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.

1 participant