-
Notifications
You must be signed in to change notification settings - Fork 688
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
Fixes show interface transceiver info Ethernet0
command failure for CMIS SFP.
#3795
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
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.
PR Overview
This PR fixes the failure of the "show interface transceiver info Ethernet0" command for CMIS SFP by ensuring the correct data map is used based on the SFP type.
- Added a check for the 'supported_max_tx_power' key to distinguish C-CMIS SFP.
- Updated the data map selection logic in the SFP show command and refactored related SFP helper dictionaries.
Reviewed Changes
File | Description |
---|---|
scripts/sfpshow | Updated data map selection logic to support C-CMIS SFP devices. |
utilities_common/sfp_helper.py | Refactored SFP helper dictionaries and removed redundant keys. |
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
'supported_max_laser_freq': 'Supported Max Laser Frequency', | ||
'supported_min_laser_freq': 'Supported Min Laser Frequency', | ||
} | ||
|
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.
@mihirpat1 should we fix the CMIS_DATA_MAP also which includes QSFP_DATA_MAP fields not applicable for CMIS?
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.
@prgeor Sure - Yes, we can fix here and at the below location as well
https://github.com/sonic-net/sonic-platform-common/blob/c6f6bed9eae562d1a045bbf62601216707969ca9/sonic_platform_base/sonic_xcvr/api/public/cmis.py#L81
Some of the unwanted fields in CMIS are
- encoding
- ext_rateselect_compliance
- nominal_bit_rate
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.
@az-pz can you address this
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.
@az-pz Please attach the output of show int transceiver info
for the following types of optics
- CMIS optic
- C-CMIS optic
- 400ZR
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@mihirpat1 I have added the output for CMIS and C-CMIS SFPs in the description. I will add the output for 400ZR soon. |
@mihirpat1 , I have added the output of 400ZR as well. |
What I did
show interface transceiver info Ethernet0
command was failing for CMIS SFP after this change: https://github.com/sonic-net/sonic-platform-daemons/pull/590/files#diff-fc70c43977a1ce57f3a6e9d7d09cb7ea5204f52b3adf3162936205e5680efb2f . Fixed the failing command.How I did it
Added a check for C-CMIS SFP to pick the right dict to generate data.
How to verify it
Run
show interface transceiver info Ethernet0
command on a CMIS SFP.Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)
CMIS SFP:
C-CMIS SFP:
admin@sonic:~$ show int trans info Ethernet144 Ethernet144: SFP EEPROM detected Active Firmware: 3.3.37 Active application selected code assigned to host lane 1: 1 Active application selected code assigned to host lane 2: 1 Active application selected code assigned to host lane 3: 1 Active application selected code assigned to host lane 4: 1 Active application selected code assigned to host lane 5: 1 Active application selected code assigned to host lane 6: 1 Active application selected code assigned to host lane 7: 1 Active application selected code assigned to host lane 8: 1 Application Advertisement: 400GAUI-8 C2M (Annex 120E) - Host Assign (0x1) - 400ZR, DWDM, amplified - Media Assign (0x1) 100GAUI-2 C2M (Annex 135G) - Host Assign (0x55) - 400ZR, DWDM, amplified - Media Assign (0x1) CMIS Rev: 5.0 Connector: LC Encoding: N/A Extended Identifier: Power Class 8 (18.0W Max) Extended RateSelect Compliance: N/A Host Lane Count: 8 Identifier: QSFP-DD Double Density 8X Pluggable Transceiver Inactive Firmware: 3.3.37 Length Cable Assembly(m): 0.0 Media Interface Technology: C-band tunable laser Media Lane Count: 1 Module Hardware Rev: 0.0 Nominal Bit Rate(100Mbs): N/A Specification compliance: sm_media_interface Supported Max Laser Frequency: 196100 Supported Max TX Power: -10.3 Supported Min Laser Frequency: 191300 Supported Min TX Power: -14.0 Vendor Date Code(YYYY-MM-DD Lot): 2021-04-20 Vendor Name: INPHI CORP Vendor OUI: 00-21-b8 Vendor PN: IN-Q3JZ1-TC-M1 Vendor Rev: 01 Vendor SN: L2116D0146
QSFP Interface:
admin@sonic:~$ show int trans info Ethernet260 Ethernet260: SFP EEPROM detected Application Advertisement: N/A Connector: LC Encoding: 64B/66B Extended Identifier: GBIC/SFP defined by two-wire interface ID Extended RateSelect Compliance: Unknown Identifier: SFP/SFP+/SFP28 Length OM3(10m): 30.0 Nominal Bit Rate(100Mbs): 103 Specification compliance: 10G Ethernet Compliance: 10GBASE-SR ESCON Compliance: Unknown Ethernet Compliance: Unknown Fibre Channel Link Length: Unknown Fibre Channel Speed: Unknown Fibre Channel Transmission Media: Unknown Fibre Channel Transmitter Technology: Unknown Infiniband Compliance: Unknown SFP+CableTechnology: Unknown SONET Compliance Codes: Unknown Vendor Date Code(YYYY-MM-DD Lot): 2014-02-08 Vendor Name: FINISAR CORP. Vendor OUI: 00-90-65 Vendor PN: FTLX8571D3BCL Vendor Rev: A Vendor SN: AR62NDY
400ZR: