You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for rx_disable, rx_disable_channel in CMIS_API for transceivers (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)
0 commit comments