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

Fix issue: show interfaces transceiver eeprom -d should display same entry for CMIS cable #2864

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

Junchao-Mellanox
Copy link
Collaborator

What I did

show interfaces transceiver eeprom -d should display same entry for CMIS cable

QSFP-DD:

Ethernet88: SFP EEPROM detected
        Active Firmware: 0.0
        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: N/A
        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: 400G CR8 - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   200GBASE-CR4 (Clause 136) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR2 (Clause 136) - Host Assign (0x55) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR4 (Clause 92) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   50GBASE-CR (Clause 126) - Host Assign (0xff) - Copper cable - Media Assign (Unknown)
                                   40GBASE-CR4 (Clause 85) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   25GBASE-CR CA-N (Clause 110) - Host Assign (0xff) - Copper cable - Media Assign (Unknown)
                                   1000BASE -CX(Clause 39) - Host Assign (0xff) - Copper cable - Media Assign (Unknown)
        CMIS Rev: 3.0
        Connector: No separable connector
        Encoding: N/A
        Extended Identifier: Power Class 1 (0.25W Max)
        Extended RateSelect Compliance: N/A
        Host Lane Count: 8
        Identifier: QSFP-DD Double Density 8X Pluggable Transceiver
        Inactive Firmware: N/A
        Length Cable Assembly(m): 0.5
        Media Interface Technology: Copper cable unequalized
        Media Lane Count: 0
        Module Hardware Rev: 0.0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: passive_copper_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): 2020-04-08   
        Vendor Name: Mellanox        
        Vendor OUI: 00-02-c9
        Vendor PN: MCP1660-W00AE30 
        Vendor Rev: A2
        Vendor SN: MT2015VS04502   
        ChannelMonitorValues:
        ChannelThresholdValues:
        ModuleMonitorValues:
        ModuleThresholdValues:

Output of OSFP:

Ethernet8: SFP EEPROM detected
        Active Firmware: 0.0
        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: N/A
        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: IB HDR (Arch.Spec.Vol.2) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   IB SDR (Arch.Spec.Vol.2) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   200GBASE-CR4 (Clause 136) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR2 (Clause 136) - Host Assign (0x55) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR4 (Clause 92) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
        CMIS Rev: 5.0
        Connector: No separable connector
        Encoding: N/A
        Extended Identifier: Power Class 1 (0.25W Max)
        Extended RateSelect Compliance: N/A
        Host Lane Count: 4
        Identifier: OSFP 8X Pluggable Transceiver
        Inactive Firmware: N/A
        Length Cable Assembly(m): 1.5
        Media Interface Technology: Copper cable unequalized
        Media Lane Count: 0
        Module Hardware Rev: 0.0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: passive_copper_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): 2022-09-15   
        Vendor Name: NVIDIA          
        Vendor OUI: 48-b0-2d
        Vendor PN: MCP7Y60-H01A    
        Vendor Rev: A4
        Vendor SN: MT2239VS01340   
        MonitorData:
        ThresholdData:

You will see that QSFP-DD has entry "ChannelMonitorValues", "ChannelThresholdValues", "ModuleMonitorValues" and "ModuleThresholdValues", but OSFP only has "MonitorData" and "ThresholdData"

How I did it

CLI DOM parser should treat OSFP and QSFP-DD as the same.

How to verify it

Added new unit test case to cover it.

...
tests/sfp_test.py::TestSFP::test_osfp_eeprom_with_dom PASSED             [ 59%]
tests/sfputil_test.py::TestSfputil::test_convert_dom_to_output_string PASSED             [ 60%]
...

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

Ethernet8: SFP EEPROM detected
        Active Firmware: 0.0
        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: N/A
        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: IB HDR (Arch.Spec.Vol.2) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   IB SDR (Arch.Spec.Vol.2) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   200GBASE-CR4 (Clause 136) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR2 (Clause 136) - Host Assign (0x55) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR4 (Clause 92) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
        CMIS Rev: 5.0
        Connector: No separable connector
        Encoding: N/A
        Extended Identifier: Power Class 1 (0.25W Max)
        Extended RateSelect Compliance: N/A
        Host Lane Count: 4
        Identifier: OSFP 8X Pluggable Transceiver
        Inactive Firmware: N/A
        Length Cable Assembly(m): 1.5
        Media Interface Technology: Copper cable unequalized
        Media Lane Count: 0
        Module Hardware Rev: 0.0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: passive_copper_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): 2022-09-15   
        Vendor Name: NVIDIA          
        Vendor OUI: 48-b0-2d
        Vendor PN: MCP7Y60-H01A    
        Vendor Rev: A4
        Vendor SN: MT2239VS01340   
        MonitorData:
        ThresholdData:

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

Ethernet8: SFP EEPROM detected
        Active Firmware: 0.0
        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: N/A
        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: IB HDR (Arch.Spec.Vol.2) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   IB SDR (Arch.Spec.Vol.2) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   200GBASE-CR4 (Clause 136) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR2 (Clause 136) - Host Assign (0x55) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR4 (Clause 92) - Host Assign (0x11) - Copper cable - Media Assign (Unknown)
        CMIS Rev: 5.0
        Connector: No separable connector
        Encoding: N/A
        Extended Identifier: Power Class 1 (0.25W Max)
        Extended RateSelect Compliance: N/A
        Host Lane Count: 4
        Identifier: OSFP 8X Pluggable Transceiver
        Inactive Firmware: N/A
        Length Cable Assembly(m): 1.5
        Media Interface Technology: Copper cable unequalized
        Media Lane Count: 0
        Module Hardware Rev: 0.0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: passive_copper_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): 2022-09-15   
        Vendor Name: NVIDIA          
        Vendor OUI: 48-b0-2d
        Vendor PN: MCP7Y60-H01A    
        Vendor Rev: A4
        Vendor SN: MT2239VS01340   
        ChannelMonitorValues:
        ChannelThresholdValues:
        ModuleMonitorValues:
        ModuleThresholdValues:

@Junchao-Mellanox
Copy link
Collaborator Author

/azpw run Azure.sonic-utilities

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Junchao-Mellanox
Copy link
Collaborator Author

/azpw run Azure.sonic-utilities

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Junchao-Mellanox
Copy link
Collaborator Author

Hi @prgeor , could you please help review this?

@prgeor prgeor merged commit f186376 into sonic-net:master Jun 14, 2023
@Junchao-Mellanox Junchao-Mellanox deleted the fix-osfp branch June 14, 2023 06:18
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Jun 20, 2023
Update sonic-utilities submodule pointer to include the following:
* 0b629ba1 Revert [chassis][voq] Clear fabric counters queue/port (2789) ([sonic-net#2882](sonic-net/sonic-utilities#2882))
* 3ba8241a [db_migtrator] Add migration of FLEX_COUNTER_DELAY_STATUS during 1911->master upgrade + fast-reboot. Add UT. ([sonic-net#2839](sonic-net/sonic-utilities#2839))
* fceef2ed [chassis][voq] Clear fabric counters queue/port ([sonic-net#2789](sonic-net/sonic-utilities#2789))
* 659ba24b [syslog] Adjust runningconfiguration syslog command ([sonic-net#2843](sonic-net/sonic-utilities#2843))
* 46fba26f [db_migrator] add required protocol field in ROUTE_TABLE ([sonic-net#2766](sonic-net/sonic-utilities#2766))
* f186376e Fix issue: show interfaces transceiver eeprom -d should display same entry for CMIS cable ([sonic-net#2864](sonic-net/sonic-utilities#2864))
* de491798 fix precedence in portstat CLI ([sonic-net#2874](sonic-net/sonic-utilities#2874))

Signed-off-by: dprital <drorp@nvidia.com>
@Junchao-Mellanox
Copy link
Collaborator Author

Hi @StormLiangMS , could you please help cherry-pick to 202211?

dprital added a commit to dprital/sonic-buildimage that referenced this pull request Jun 21, 2023
Update sonic-utilities submodule pointer to include the following:
* 0b629ba1 Revert [chassis][voq] Clear fabric counters queue/port (2789) ([sonic-net#2882](sonic-net/sonic-utilities#2882))
* 3ba8241a [db_migtrator] Add migration of FLEX_COUNTER_DELAY_STATUS during 1911->master upgrade + fast-reboot. Add UT. ([sonic-net#2839](sonic-net/sonic-utilities#2839))
* fceef2ed [chassis][voq] Clear fabric counters queue/port ([sonic-net#2789](sonic-net/sonic-utilities#2789))
* 659ba24b [syslog] Adjust runningconfiguration syslog command ([sonic-net#2843](sonic-net/sonic-utilities#2843))
* 46fba26f [db_migrator] add required protocol field in ROUTE_TABLE ([sonic-net#2766](sonic-net/sonic-utilities#2766))
* f186376e Fix issue: show interfaces transceiver eeprom -d should display same entry for CMIS cable ([sonic-net#2864](sonic-net/sonic-utilities#2864))
* de491798 fix precedence in portstat CLI ([sonic-net#2874](sonic-net/sonic-utilities#2874))

Signed-off-by: dprital <drorp@nvidia.com>
yxieca pushed a commit that referenced this pull request Jun 21, 2023
…entry for CMIS cable (#2864)

* Fix issue: show interfaces transceiver eeprom -d should display same entry for CMIS cable

* Fix unit test issue
pdhruv-marvell pushed a commit to pdhruv-marvell/sonic-utilities that referenced this pull request Aug 23, 2023
…entry for CMIS cable (sonic-net#2864)

* Fix issue: show interfaces transceiver eeprom -d should display same entry for CMIS cable

* Fix unit test issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants