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

[SFP-refactor]Fix vendor revision key issue #4816

Merged
merged 2 commits into from
Dec 23, 2021

Conversation

aravindmani-1
Copy link
Contributor

@aravindmani-1 aravindmani-1 commented Dec 6, 2021

Description of PR

With new SFP refactor, hardware revision key won't be returned for the media except CMIS
Summary:
Fixes # sonic-net/sonic-platform-common#250

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

sonic-mgmt test case may fail with the integration of new SFP refactor

How did you do it?

Check the expected list of keys in test_sfp.py

How did you verify/test it?

Verified in DellEMC Z9332f platform.
After fix:
sfputil show eeprom -p Ethernet80
Ethernet80: SFP EEPROM detected
Application Advertisement: N/A
Connector: No separable connector
Encoding: Unspecified
Extended Identifier: Power Class 1 Module (1.5W max. Power consumption), No CLEI code present in Page 02h, No CDR in TX, No CDR in RX
Extended RateSelect Compliance: QSFP+ Rate Select Version 1
Identifier: QSFP+ or later with SFF-8636 or SFF-8436
Length Cable Assembly(m): 1.0
Nominal Bit Rate(100Mbs): 103
Specification compliance:
10/40G Ethernet Compliance Code: 40GBASE-CR4
Fibre Channel Link Length: Medium (M)
Fibre Channel Speed: Unknown
Fibre Channel Transmission Media: Twin Axial Pair (TW)
Fibre Channel Transmitter Technology: Unknown
Gigabit Ethernet Compliant Codes: Unknown
SAS/SATA Compliance Codes: Unknown
SONET Compliance Codes: Unknown
Vendor Date Code(YYYY-MM-DD Lot): 2019-01-09
Vendor Name: Amphenol
Vendor OUI: 78-a7-14
Vendor PN: 616750000
Vendor Rev: C
Vendor SN: CN01M31V9172909
root@sonic-10431:~#

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@aravindmani-1 aravindmani-1 requested review from sujinmkang and a team as code owners December 6, 2021 14:17
@prgeor
Copy link
Contributor

prgeor commented Dec 6, 2021

sfp.py in vendor code, still uses 'hardware_rev' key https://github.com/Azure/sonic-buildimage/blob/master/device/accton/x86_64-accton_as5835_54x-r0/sonic_platform/sfp.py#L375. Also Xcvrd also uses hardware_rev key

@aravindmani-1
Copy link
Contributor Author

sfp.py in vendor code, still uses 'hardware_rev' key https://github.com/Azure/sonic-buildimage/blob/master/device/accton/x86_64-accton_as5835_54x-r0/sonic_platform/sfp.py#L375. Also Xcvrd also uses hardware_rev key

sonic-net/sonic-buildimage#9447 will fix this issue.

@sujinmkang
Copy link
Contributor

sujinmkang commented Dec 8, 2021

@aravindmani-1 and @prgeor can you please share the refactored sfp change which is related to this change? Is there a way to check if the sfp is refactored or not? like sfp version checking? Changing the test without any checking will result in test failures for all previous image or other branch image.

@aravindmani-1
Copy link
Contributor Author

aravindmani-1 commented Dec 9, 2021

@aravindmani-1 and @prgeor can you please share the refactored sfp change which is related to this change? Is there a way to check if the sfp is refactored or not? like sfp version checking? Changing the test without any checking will result in test failures for all previous image or other branch image.

https://github.com/Azure/sonic-platform-common/blob/77da9c8440dda385db745c070453ff343acc1eac/sonic_platform_base/sonic_xcvr/api/public/cmis.py#L160
With earlier SFP implementation, hardware_rev is used in place of vendor_rev key. hardware_rev is not applicable to media types except CMIS.
you can check the difference in sonic-net/sonic-utilities#1950 with new SFP refactor.
We are planning to run sonic-mgmt scripts once new SFP refactoring is done.

sujinmkang
sujinmkang previously approved these changes Dec 17, 2021
@prgeor prgeor merged commit f592321 into sonic-net:master Dec 23, 2021
AntonHryshchuk pushed a commit to AntonHryshchuk/sonic-mgmt that referenced this pull request Jan 4, 2022
* [SFP-refactor]Fix vendor revision key issue

* update sfp tests
@aravindmani-1 aravindmani-1 deleted the fix_vendor_rev branch March 11, 2022 04:27
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