sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
734 stars 1.41k forks source link

CMIS 4.0 QSFP-DD EEPROM decode fails #6516

Open tbgowda opened 3 years ago

tbgowda commented 3 years ago

Description

Unable to decode CMIS 4.0 compliant QSFP-DD optics module EEPROM to get the vendor information.

Steps to reproduce the issue:

  1. Use any CMIS 4.0 compliant QSFP-DD module on a Sonic system.
  2. Dump the vendor information through “show interface transc eeprom”

Describe the results you received:

Ethernet23: SFP EEPROM detected Application Advertisement: N/A Connector: Unknown Encoding: Unknown Extended Identifier: Unknown Extended RateSelect Compliance: Unknown Identifier: QSFP-DD Double Density 8X Pluggable Transceiver Length Cable Assembly(m): 124 Nominal Bit Rate(100Mbs): 73 Specification compliance: {'Fibre Channel Speed': '200 Mbytes/Sec', '10/40G Ethernet Compliance Code': '10GBase-LRM', 'Fibre Channel link length/Transmitter Technology': 'Electrical inter-enclosure (EL)', 'Fibre Channel transmission media': 'Multi-mode 50m (M5)', 'SONET Compliance codes': 'OC 48 short reach', 'Gigabit Ethernet Compliant codes': '1000BASE-CX'} Vendor Date Code(YYYY-MM-DD Lot): 20 Vendor Name: T-DP4CNH-NCI Vendor OUI: 45-49-4e Vendor PN: L23340629 19 Vendor Rev: 08 Vendor SN: PCAA�0

Describe the results you expected: On a older QSFP-DD module: Ethernet4: SFP EEPROM detected Application Advertisement: N/A Connector: No separable connector Encoding: Unspecified Extended Identifier: Power Class 1(1.5W max) Extended RateSelect Compliance: QSFP+ Rate Select Version 1 Identifier: QSFP-DD Double Density 8X Pluggable Transceiver Length Cable Assembly(m): 1 Nominal Bit Rate(100Mbs): 255 Specification compliance: {'10/40G Ethernet Compliance Code': '40GBASE-CR4', 'SAS/SATA compliance codes': 'SAS 3.0G'} Vendor Date Code(YYYY-MM-DD Lot): 2018-01-05 Vendor Name: Molex Vendor OUI: 00-09-3a Vendor PN: 2015911010 Vendor Rev: Vendor SN: 800530185

Additional information you deem important (e.g. issue happens only occasionally): The issue seems to be in : src/sonic-platform-common/sonic_platform_base/sonic_sfp/sfputilbase.py SfpUtilBase::get_transceiver_info_dict

It uses hardcoded offsets to read the Vendor information where as these hardcoded offsets are not valid for CMIS 4.0 compliant QSFP-DD optics module. Link to CMIS 4.0 spec : http://www.qsfp-dd.com/wp-content/uploads/2019/05/QSFP-DD-CMIS-rev4p0.pdf Section of interest : 8.3

lguohan commented 3 years ago

@jleveque , is the cims 4.0 eeprom decode supported or not?

jleveque commented 3 years ago

@shlomibitton (who added QSFP-DD support): Which CMIS spec is the SONiC QSFP-DD driver designed against?

shlomibitton commented 3 years ago

QSFP-DD-CMIS-rev4p0

jleveque commented 3 years ago

@shlomibitton: Thanks for the quick reply. So the spec should be supported. Are you able to reproduce this issue with a CMIS 4.0 compliant QSFP-DD module?

shlomibitton commented 3 years ago

@jleveque I don't see it with our cables

root@sonic:/home/admin# show interfaces transceiver eeprom Ethernet0 -d Ethernet0: SFP EEPROM detected Application Advertisement: 400GAUI-8 C2M (Annex 120E) - Active Cable assembly with BER < 2.6x10^-4 IB EDR (Arch.Spec.Vol.2) - Active Cable assembly with BER < 5x10^-5 IB QDR (Arch.Spec.Vol.2) - Active Cable assembly with BER < 10^-12 Connector: No separable connector Encoding: Not supported for CMIS cables Extended Identifier: Power Class 1(10.0W Max) Extended RateSelect Compliance: Not supported for CMIS cables Identifier: QSFP-DD Double Density 8X Pluggable Transceiver Length Cable Assembly(m): 10 Nominal Bit Rate(100Mbs): Not supported for CMIS cables Specification compliance: Not supported for CMIS cables Vendor Date Code(YYYY-MM-DD Lot): 2020-05-22 Vendor Name: INNOLIGHT Vendor OUI: 44-7c-7f Vendor PN: C-DQ8FNM010-N00 Vendor Rev: 2A Vendor SN: INKAO2900002A ChannelMonitorValues: RX1Power: -3.8595dBm RX2Power: 8.1478dBm RX3Power: -22.9243dBm RX4Power: 1.175dBm TX1Bias: 17.4760mA TX2Bias: 17.4760mA TX2Power: 1.175dBm TX3Bias: 0.0000mA TX3Power: 1.175dBm TX4Bias: 0.0000mA TX4Power: 8.1647dBm ChannelThresholdValues: RxPowerHighAlarm : 6.9999dBm RxPowerHighWarning: 4.9999dBm RxPowerLowAlarm : -11.9044dBm RxPowerLowWarning : -8.9008dBm TxBiasHighAlarm : 14.9960mA TxBiasHighWarning : 12.9980mA TxBiasLowAlarm : 4.4960mA TxBiasLowWarning : 5.0000mA ModuleMonitorValues: Temperature: 43.2695C Vcc: 3.2999Volts ModuleThresholdValues: TempHighAlarm : 80.0000C TempHighWarning: 75.0000C TempLowAlarm : -10.0000C TempLowWarning : -5.0000C VccHighAlarm : 3.6352Volts VccHighWarning : 3.4672Volts VccLowAlarm : 2.9696Volts VccLowWarning : 3.1304Volts

tbgowda commented 3 years ago

Thank you for looking at this issue. It is a very interesting observation.

Could it be possible to dump the EEPROM of the INNOLIGHT optics above and match it against the spec? One of the things I looked at was to check if the optics is indeed compliant with rev 4.0 and look for the Vendor Name offset, which is different for non 4.0 CMIS spec. Also, could you try this out with 201911 drop?

00000000 18 40 00 06 00 00 00 00 01 00 a0 00 00 00 25 a4 << Version compliance starts at byte offset 0x1 . . 00000080 18 43 49 53 43 4f 2d 49 4e 4e 4f 4c 49 47 48 54. << Vendor Name starts at byte offset 0x81

On non 4.0 CMIS compliant optics the Vendor Name starts at byte offset 0x94.