Skip to content

SFP(sff8472 attributes) transciever eeprom attribute support. #74

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

Merged
merged 1 commit into from
Mar 20, 2020

Conversation

shilimkarvg
Copy link
Contributor

SFP(sff8472 attributes) transciever eeprom attribute support.

Traceback (most recent call last):
Nov  5 14:32:52.721493 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 1077, in <module>
Nov  5 14:32:52.723223 sonic INFO pmon#supervisord: xcvrd     main()
Nov  5 14:32:52.723775 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 1074, in main
Nov  5 14:32:52.724157 sonic INFO pmon#supervisord: xcvrd     xcvrd.run()
Nov  5 14:32:52.724486 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 1038, in run
Nov  5 14:32:52.724836 sonic INFO pmon#supervisord: xcvrd     self.init()
Nov  5 14:32:52.725176 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 1022, in init
Nov  5 14:32:52.725539 sonic INFO pmon#supervisord: xcvrd     post_port_sfp_dom_info_to_db(is_warm_start, self.stop_event)
Nov  5 14:32:52.725916 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 387, in post_port_sfp_dom_info_to_db
Nov  5 14:32:52.726245 sonic INFO pmon#supervisord: xcvrd     post_port_dom_threshold_info_to_db(logical_port_name, dom_tbl, stop_event)
Nov  5 14:32:52.726596 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 281, in post_port_dom_threshold_info_to_db
Nov  5 14:32:52.726903 sonic INFO pmon#supervisord: xcvrd     dom_info_dict = _wrapper_get_transceiver_dom_threshold_info(physical_port)
Nov  5 14:32:52.727353 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 148, in _wrapper_get_transceiver_dom_threshold_info
Nov  5 14:32:52.727798 sonic INFO pmon#supervisord: xcvrd     return platform_sfputil.get_transceiver_dom_threshold_info_dict(physical_port)
Nov  5 14:32:52.728183 sonic INFO pmon#supervisord: xcvrd   File "/usr/local/lib/python2.7/dist-packages/sonic_sfp/sfputilbase.py", line 1190, in get_transceiver_dom_threshold_info_dict

@msftclas
Copy link

msftclas commented Dec 30, 2019

CLA assistant check
All CLA requirements met.

@lguohan lguohan merged commit 9b1dea5 into sonic-net:master Mar 20, 2020
@wendani
Copy link

wendani commented Apr 7, 2020

Request for 201911 branch @lguohan @abdosi

oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
…nic-net#74)

As part of consolidating all common Python-based functionality into the new sonic-py-common package, this pull request migrates from importing the sonic-daemon-base package to importing the sonic-py-common package. This is the next step toward resolving sonic-net/sonic-buildimage#4999.

- Also reorganize imports for consistency
Junchao-Mellanox pushed a commit to Junchao-Mellanox/sonic-platform-common that referenced this pull request May 7, 2025
…eivers (sonic-net#74)

<!-- Provide a general summary of your changes in the Title above -->

#### Description
This PR introduces **RX disable support** for CMIS-compliant transceivers, aligning it with TX disable functionality.
<!--
 Describe your changes in detail
 This PR introduces **RX disable support** for CMIS-compliant transceivers, aligning it with TX disable functionality.
-->

#### Motivation and Context
- Added the following methods in `CmisApi` and `XcvrApi`:
 - `get_rx_disable()`
 - `get_rx_disable_channel()`
 - `rx_disable()`
 - `rx_disable_channel()`
- Updated `SfpOptoeBase` to expose RX disable functionality.
<!--
 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
-->

- Defined `RX_DISABLE_SUPPORT_FIELD` in `consts.py`.
- Added `RX_DISABLE_FIELD` at **Byte 138** in `CmisMemMap`.
- Updated `CTRLS_ADVT_FIELD` to include `RX_DISABLE_SUPPORT_FIELD`.

- Integrated RX disable methods into `sfp_optoe_base.py`, mirroring TX disable operations.

#### How Has This Been Tested?
UT and deploy on testbed, please see attached testbed results
<!--
 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.
-->
```
sfp1 = platform_chassis.get_sfp(1)>>> platform_chassis = sonic_platform.platform.Platform().get_chassis()
>>> sfp1 = platform_chassis.get_sfp(1)
>>> sfp1.get_rx_disable()
[True, False, False, False, False, False, False, False]
>>> sfp1.rx_disable_channel(1, 1)
True
>>> sfp1.get_rx_disable()
[True, False, False, False, False, False, False, False]
>>> sfp1.rx_disable_channel(1, 0)
True
>>> sfp1.get_rx_disable()
[False, False, False, False, False, False, False, False]
>>> sfp1.rx_disable_channel(2, 0)
True
>>> sfp1.rx_disable_channel(2, 1)
True
>>> sfp1.get_rx_disable()
[False, True, False, False, False, False, False, False]
>>> sfp1.rx_disable_channel(2, 0)
True
>>> sfp1.get_rx_disable()
[False, False, False, False, False, False, False, False]
>>>
```
#### Additional Information (Optional)
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.

6 participants