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

Independent Module - MDF update for Passive modules #122

Open
wants to merge 10 commits into
base: master_inde
Choose a base branch
from

Conversation

tshalvi
Copy link
Collaborator

@tshalvi tshalvi commented Dec 24, 2023

Why I did it

To extend the support of Independent Module to also include passive modules.

Work item tracking
  • Microsoft ADO (number only):

How I did it

I Updated the Module Detection Flow logic to also label passive modules as Software Control

How to verify it

Verify passive modules are labeled as SW_CONTROL using the relevant sysfs, and verify all ports are up and have traffic.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

logger.log_debug(f"check_module_type reading mci max frequency for port {port}")
read_mci = xcvr_api.xcvr_eeprom.read_raw(CMIS_MCI_EEPROM_OFFSET, 1)
logger.log_debug(f"check_module_type read mci max frequency {read_mci} for port {port}")
frequency = read_mci & CMIS_MCI_MASK
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will it generate 0 or 1? I understand this is existing code, should we open a bug to Doron or fix it by ourself here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I actually tried to run this on some python interpreter online:

CMIS_MCI_MASK = 0b00001100
read_mci = 0b10000000
frequency = read_mci & CMIS_MCI_MASK
print(frequency)

and looks like it does generate 0 or 1

Copy link
Collaborator

Choose a reason for hiding this comment

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

>>> read_mci = 0b10001000 # read mci is 1MHz
>>> frequency = read_mci & CMIS_MCI_MASK
>>> frequency
8

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

Successfully merging this pull request may close these issues.

2 participants