-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master_inde
Are you sure you want to change the base?
Independent Module - MDF update for Passive modules #122
Conversation
platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py
Outdated
Show resolved
Hide resolved
platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py
Outdated
Show resolved
Hide resolved
platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py
Outdated
Show resolved
Hide resolved
platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py
Outdated
Show resolved
Hide resolved
…the case of flat memory modules that are not CMIS nor SFF
platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py
Outdated
Show resolved
Hide resolved
platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py
Outdated
Show resolved
Hide resolved
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Why I did it
To extend the support of Independent Module to also include passive modules.
Work item tracking
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)
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)