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

sfputil: skip displaying the values that are not supported. #3773

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vvolam
Copy link

@vvolam vvolam commented Feb 20, 2025

What I did

Skip displaying the fields which are unsupported for CMIS specific transceivers.

How I did it

Skip the key with "N/A" value in convert_sfp_info_to_output_string()

How to verify it

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

Previous command output (if the output of a command-line utility has changed)

sfputil show eeprom -d -p Ethernet0

Ethernet0: 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): 0
Specification compliance: sm_media_interface
Supported Max Laser Frequency: N/AGHz
Supported Max TX Power: N/AdBm
Supported Min Laser Frequency: N/AGHz
Supported Min TX Power: N/AdBm

Vendor Date Code(YYYY-MM-DD Lot): 2024-04-25
Vendor Name: FINISAR CORP.
Vendor OUI: 00-90-65
Vendor PN: FTCE4517E1PCA-2F
Vendor Rev: A0
Vendor SN: XACB0QQ

New command output (if the output of a command-line utility has changed)

sfputil show eeprom -p Ethernet0

Ethernet0: 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
Extended Identifier: Power Class 8 (16.0W Max)
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): 0
Specification compliance: sm_media_interface
Vendor Date Code(YYYY-MM-DD Lot): 2024-04-25
Vendor Name: FINISAR CORP.
Vendor OUI: 00-90-65
Vendor PN: FTCE4517E1PCA-2F
Vendor Rev: A0
Vendor SN: XACB0QQ

@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 20, 2025 03:41
@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).

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.

2 participants