Skip to content
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

Initialize unsupported values to 'N/A' in CmisApi::get_transceiver_info #545

Merged
merged 9 commits into from
Mar 1, 2025

Conversation

vvolam
Copy link
Contributor

@vvolam vvolam commented Feb 19, 2025

Description

Initialize all the unsupported values of TRANSCEIVER_INFO for CMIS specific interfaces in CmisApi::get_transceiver_info().

Motivation and Context

By initializing values in CmisApi::get_transceiver_info() will simplify the logic in post_port_sfp_info_to_db(). Also, avoids duplication of the code and makes it future ready for any newly added key:value pairs.

How Has This Been Tested?

  • Verified 'show interfaces transceiver info' and 'sfputil show eeprom -p' outputs on an Arista testbed.

Additional Information (Optional)

Before the changes:

$ sfputil show eeprom -d -p Ethernet4
Ethernet4: SFP EEPROM detected
Active App Selection Host Lane 1: 1
Active App Selection Host Lane 2: 1
Active App Selection Host Lane 3: 1
Active App Selection Host Lane 4: 1
Active App Selection Host Lane 5: 1
Active App Selection Host Lane 6: 1
Active App Selection Host Lane 7: 1
Active App Selection Host Lane 8: 1
Application Advertisement: 100GAUI-1-L C2M (Annex 120G) - Host Assign (0xff) - 100GBASE-DR (Cl 140) - Media Assign (0xff)
200GAUI-2-L C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
400GAUI-4-L C2M (Annex 120G) - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
IB NDR - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
800G L C2M (placeholder) - Host Assign (0x1) - 800GBASE-DR8 (placeholder) - Media Assign (0x1)
200GAUI-4 C2M (Annex 120E) - Host Assign (0x11) - 200GBASE-DR4 (Cl 121) - Media Assign (0x11)
IB HDR (Arch.Spec.Vol.2) - Host Assign (0x11) - 200GBASE-DR4 (Cl 121) - Media Assign (0x11)
100GAUI-1-S C2M (Annex 120G) - Host Assign (0xff) - 100GBASE-DR (Cl 140) - Media Assign (0xff)
200GAUI-2-S C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
400GAUI-4-S C2M (Annex 120G) - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
800G S C2M (placeholder) - Host Assign (0x1) - 800GBASE-DR8 (placeholder) - Media Assign (0x1)
CMIS Revision: 5.2
Connector: MPO 2x12
Encoding: N/A
Extended Identifier: Power Class 8 (15.0W Max)
Extended RateSelect Compliance: N/A
Hardware Revision: 1.10
Host Electrical Interface: 100GAUI-1-L C2M (Annex 120G)
Host Lane Assignment Options: 255
Host Lane Count: 1
Identifier: OSFP 8X Pluggable Transceiver
Length Cable Assembly(m): 0.0
Media Interface Code: 100GBASE-DR (Cl 140)
Media Interface Technology: 1310 nm DFB
Media Lane Assignment Options: 255
Media Lane Count: 1
Nominal Bit Rate(100Mbs): 0
Specification compliance: sm_media_interface
Vendor Date Code(YYYY-MM-DD Lot): XXXXX
Vendor Name: XXXXXX
Vendor OUI: XXXXXX
Vendor PN: XXXXXX
Vendor Rev: XXXX
Vendor SN: XXXXXX
ChannelMonitorValues:
RX1Power: 3.042dBm
RX2Power: 2.777dBm
RX3Power: 3.309dBm
RX4Power: 3.186dBm
RX5Power: 3.15dBm
RX6Power: 3.184dBm
RX7Power: 2.26dBm
RX8Power: 2.615dBm
TX1Bias: 0.0mA
TX1Power: -40.0dBm
TX2Bias: 0.0mA
TX2Power: -40.0dBm
TX3Bias: 0.0mA
TX3Power: -40.0dBm
TX4Bias: 0.0mA
TX4Power: -40.0dBm
TX5Bias: 129.912mA
TX5Power: 2.097dBm
TX6Bias: 129.912mA
TX6Power: 2.367dBm
TX7Bias: 129.912mA
TX7Power: 1.55dBm
TX8Bias: 129.912mA
TX8Power: 2.067dBm
ChannelThresholdValues:
RxPowerHighAlarm : 4.5dBm
RxPowerHighWarning: 4.0dBm
RxPowerLowAlarm : -6.402dBm
RxPowerLowWarning : -5.901dBm
TxBiasHighAlarm : 340.0mA
TxBiasHighWarning : 320.0mA
TxBiasLowAlarm : 40.0mA
TxBiasLowWarning : 60.0mA
TxPowerHighAlarm : 6.0dBm
TxPowerHighWarning: 5.0dBm
TxPowerLowAlarm : -4.901dBm
TxPowerLowWarning : -3.901dBm
ModuleMonitorValues:
Temperature: 35.766C
Vcc: 3.339Volts
ModuleThresholdValues:
TempHighAlarm : 80.0C
TempHighWarning: 75.0C
TempLowAlarm : -10.0C
TempLowWarning : -5.0C
VccHighAlarm : 3.6Volts
VccHighWarning : 3.465Volts
VccLowAlarm : 3.0Volts
VccLowWarning : 3.135Volts

$ show interfaces transceiver info Ethernet4
Ethernet4: SFP EEPROM detected
Active Firmware: XXXXXX
Active application selected code assigned to host lane 1: N/A
Active application selected code assigned to host lane 2: N/A
Active application selected code assigned to host lane 3: N/A
Active application selected code assigned to host lane 4: N/A
Active application selected code assigned to host lane 5: 1
Active application selected code assigned to host lane 6: N/A
Active application selected code assigned to host lane 7: N/A
Active application selected code assigned to host lane 8: N/A
Application Advertisement: 100GAUI-1-L C2M (Annex 120G) - Host Assign (0xff) - 100GBASE-DR (Cl 140) - Media Assign (0xff)
200GAUI-2-L C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
400GAUI-4-L C2M (Annex 120G) - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
IB NDR - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
800G L C2M (placeholder) - Host Assign (0x1) - 800GBASE-DR8 (placeholder) - Media Assign (0x1)
200GAUI-4 C2M (Annex 120E) - Host Assign (0x11) - 200GBASE-DR4 (Cl 121) - Media Assign (0x11)
IB HDR (Arch.Spec.Vol.2) - Host Assign (0x11) - 200GBASE-DR4 (Cl 121) - Media Assign (0x11)
100GAUI-1-S C2M (Annex 120G) - Host Assign (0xff) - 100GBASE-DR (Cl 140) - Media Assign (0xff)
200GAUI-2-S C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
400GAUI-4-S C2M (Annex 120G) - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
800G S C2M (placeholder) - Host Assign (0x1) - 800GBASE-DR8 (placeholder) - Media Assign (0x1)
CMIS Rev: 5.2
Connector: MPO 2x12
Encoding: N/A
Extended Identifier: Power Class 8 (15.0W Max)
Extended RateSelect Compliance: N/A
Host Lane Count: 1
Identifier: OSFP 8X Pluggable Transceiver
Inactive Firmware: XXXXXX
Length Cable Assembly(m): 0.0
Media Interface Technology: 1310 nm DFB
Media Lane Count: 1
Module Hardware Rev: 1.10
Nominal Bit Rate(100Mbs): 0
Specification compliance: sm_media_interface
Supported Max Laser Frequency: N/A
Supported Max TX Power: N/A
Supported Min Laser Frequency: N/A
Supported Min TX Power: N/A
Vendor Date Code(YYYY-MM-DD Lot): XXXXX
Vendor Name: XXXXXXX
Vendor OUI: XXXXX
Vendor PN: XXXXXX
Vendor Rev: XXXXXX
Vendor SN: XXXXX

After the changes:

$ sfputil show eeprom -d -p Ethernet4
Ethernet4: SFP EEPROM detected
Active App Selection Host Lane 1: 5
Active App Selection Host Lane 2: 5
Active App Selection Host Lane 3: 5
Active App Selection Host Lane 4: 5
Active App Selection Host Lane 5: 5
Active App Selection Host Lane 6: 5
Active App Selection Host Lane 7: 5
Active App Selection Host Lane 8: 5
Application Advertisement: 400GAUI-4-L C2M (Annex 120G) - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
400GAUI-4-S C2M (Annex 120G) - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
100GAUI-1-L C2M (Annex 120G) - Host Assign (0xff) - 100GBASE-DR (Cl 140) - Media Assign (0xff)
100GAUI-1-S C2M (Annex 120G) - Host Assign (0xff) - 100GBASE-DR (Cl 140) - Media Assign (0xff)
200GAUI-2-L C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
200GAUI-2-S C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
800G L C2M (placeholder) - Host Assign (0x1) - 800GBASE-DR8 (placeholder) - Media Assign (0x1)
CMIS Revision: 5.1
Connector: MPO 2x12
Encoding: N/A
Extended Identifier: Power Class 8 (16.0W Max)
Extended RateSelect Compliance: N/A
Hardware Revision: 1.0
Host Electrical Interface: 400GAUI-4-L C2M (Annex 120G)
Host Lane Assignment Options: 17
Host Lane Count: 4
Identifier: OSFP 8X Pluggable Transceiver
Length Cable Assembly(m): 0.0
Media Interface Code: 400GBASE-DR4 (Cl 124)
Media Interface Technology: 1310 nm EML
Media Lane Assignment Options: 17
Media Lane Count: 4
Nominal Bit Rate(100Mbs): N/A
Specification compliance: sm_media_interface
Vendor Date Code(YYYY-MM-DD Lot): XXXXX
Vendor Name: XXXXX
Vendor OUI: XXXXX
Vendor PN: XXXXX
Vendor Rev: XXXXX
Vendor SN: XXXXX
ChannelMonitorValues:
RX1Power: 2.537dBm
RX2Power: 1.763dBm
RX3Power: 2.683dBm
RX4Power: 2.237dBm
RX5Power: 2.343dBm
RX6Power: 3.252dBm
RX7Power: 2.936dBm
RX8Power: 2.794dBm
TX1Bias: 63.8mA
TX1Power: 1.277dBm
TX2Bias: 60.394mA
TX2Power: 1.871dBm
TX3Bias: 55.23mA
TX3Power: 1.803dBm
TX4Bias: 56.988mA
TX4Power: 1.567dBm
TX5Bias: 60.432mA
TX5Power: 1.826dBm
TX6Bias: 60.468mA
TX6Power: 1.801dBm
TX7Bias: 56.586mA
TX7Power: 1.6dBm
TX8Bias: 57.318mA
TX8Power: 1.552dBm
ChannelThresholdValues:
RxPowerHighAlarm : 4.5dBm
RxPowerHighWarning: 4.0dBm
RxPowerLowAlarm : -6.4dBm
RxPowerLowWarning : -5.901dBm
TxBiasHighAlarm : 125.0mA
TxBiasHighWarning : 120.0mA
TxBiasLowAlarm : 25.0mA
TxBiasLowWarning : 30.0mA
TxPowerHighAlarm : 6.0dBm
TxPowerHighWarning: 5.0dBm
TxPowerLowAlarm : -4.9dBm
TxPowerLowWarning : -3.9dBm
ModuleMonitorValues:
Temperature: 45.645C
Vcc: 3.321Volts
ModuleThresholdValues:
TempHighAlarm : 75.0C
TempHighWarning: 72.0C
TempLowAlarm : -5.0C
TempLowWarning : -2.0C
VccHighAlarm : 3.63Volts
VccHighWarning : 3.465Volts
VccLowAlarm : 2.97Volts
VccLowWarning : 3.135Volts

$ sfputil show eeprom -d -p Ethernet4
Ethernet4: SFP EEPROM detected
Active Firmware: XXXXX
Active application selected code assigned to host lane 1: 5
Active application selected code assigned to host lane 2: 5
Active application selected code assigned to host lane 3: 5
Active application selected code assigned to host lane 4: 5
Active application selected code assigned to host lane 5: 5
Active application selected code assigned to host lane 6: 5
Active application selected code assigned to host lane 7: 5
Active application selected code assigned to host lane 8: 5
Application Advertisement: 400GAUI-4-L C2M (Annex 120G) - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
400GAUI-4-S C2M (Annex 120G) - Host Assign (0x11) - 400GBASE-DR4 (Cl 124) - Media Assign (0x11)
100GAUI-1-L C2M (Annex 120G) - Host Assign (0xff) - 100GBASE-DR (Cl 140) - Media Assign (0xff)
100GAUI-1-S C2M (Annex 120G) - Host Assign (0xff) - 100GBASE-DR (Cl 140) - Media Assign (0xff)
200GAUI-2-L C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
200GAUI-2-S C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
800G L C2M (placeholder) - Host Assign (0x1) - 800GBASE-DR8 (placeholder) - Media Assign (0x1)
CMIS Rev: 5.1
Connector: MPO 2x12
Encoding: N/A
Extended Identifier: Power Class 8 (16.0W Max)
Extended RateSelect Compliance: N/A
Host Lane Count: 2
Identifier: OSFP 8X Pluggable Transceiver
Inactive Firmware: XXXXX
Length Cable Assembly(m): 0.0
Media Interface Technology: 1310 nm EML
Media Lane Count: 2
Module Hardware Rev: 1.0
Nominal Bit Rate(100Mbs): N/A
Specification compliance: sm_media_interface
Supported Max Laser Frequency: N/A
Supported Max TX Power: N/A
Supported Min Laser Frequency: N/A
Supported Min TX Power: N/A
Vendor Date Code(YYYY-MM-DD Lot): XXXXX
Vendor Name: XXXXX
Vendor OUI: XXXXX
Vendor PN: XXXXX
Vendor Rev: XXXXX
Vendor SN: XXXXX

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam vvolam requested review from prgeor and mihirpat1 February 19, 2025 20:55
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam vvolam force-pushed the refactor_transceiver_info branch from ea4a78e to 4fc7a86 Compare February 24, 2025 18:47
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam vvolam requested review from prgeor and mihirpat1 February 24, 2025 19:02
@vvolam vvolam force-pushed the refactor_transceiver_info branch from 4fc7a86 to 24fa1ce Compare February 25, 2025 18:02
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@mihirpat1 mihirpat1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vvolam Please add the CLI output before and after the change for sfputil show eeprom -d -p EthernetXX and show int transceiver info EthernetXX.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam
Copy link
Contributor Author

vvolam commented Feb 26, 2025

@vvolam Please add the CLI output before and after the change for sfputil show eeprom -d -p EthernetXX and show int transceiver info EthernetXX.

@mihirpat1 updated the description accordingly.

@vvolam vvolam requested a review from mihirpat1 February 26, 2025 00:11
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam vvolam requested a review from mihirpat1 February 27, 2025 02:53
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam vvolam force-pushed the refactor_transceiver_info branch from 82b0fd5 to c6fa955 Compare March 1, 2025 00:01
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam vvolam requested review from mihirpat1 and prgeor March 1, 2025 00:10
@prgeor prgeor merged commit d7f22a7 into sonic-net:master Mar 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants