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

Dynamic transceiver tuning support #2713

Merged
merged 1 commit into from
Jun 9, 2019
Merged

Conversation

dgsudharsan
Copy link
Collaborator

@dgsudharsan dgsudharsan commented Mar 28, 2019

- What I did
Dynamic transceiver tuning support
- How I did it
Dynamically program pre-emphasis and other settings based on media detected in xcvrd. The various supported media are defined in media_settings.json

- How to verify it
Perform OIR of different media types. Dump the pre-emphasis values from hardware and verify that they got reflected

- Description for the changelog

Support for dynamically programming pre-emphasis

- A picture of a cute animal (not mandatory but encouraged)

The latest UT file is attached
Z9100-SONIC-Preemp-2019-05-20-1.txt

@dgsudharsan dgsudharsan changed the title Preemphasis related changes Dynamic transceiver tuning support Mar 28, 2019
Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

as comments.

Copy link
Contributor

@stevenlu99 stevenlu99 left a comment

Choose a reason for hiding this comment

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

@dgsudharsan
How do we plan to test/debug serdes tuning values?
There are few scenarios I can think about:1

  1. during development adn ODM development, we need make sure tuning values in json file is correctly write to DB, this should be covered by media_checker script I think.
  2. We need make sure values in DB is properly programmed in ASIC at runtime, especially we can not access live setups.
  3. In each release cycle, adding new features and adding new platform/optic module support, we want quick verify that transceiver tuning feature is working properly. If possible better automate this process.

To address above 2 & 3, might I purpose below changes?

  1. we can utilize SAI API get_port_attribute to read back tuning values. Question is how and when to trigger it. A typical scenario is that some ports might behave wired or giving CRCs sometime. If this happens, the fist thing we want check would be making sure serdes are tuned properly. We can discuss it.
  2. Can we add feature in xcvrd to "fake" unplug a SFP? Basically we can mark one or more SFP(s) are unplugged(even they are still in cages), so that we can simulate OIR without physically do that in the lab. With such "fake unplug" feature, we can automate the testing on testbed with few SFPs very quickly.
    Please let me know how you think and we can discuss offline.

Above suggestions could be another separate pull req base on schedule.

@dgsudharsan
Copy link
Collaborator Author

@dgsudharsan
How do we plan to test/debug serdes tuning values?
There are few scenarios I can think about:1

  1. during development adn ODM development, we need make sure tuning values in json file is correctly write to DB, this should be covered by media_checker script I think.
  2. We need make sure values in DB is properly programmed in ASIC at runtime, especially we can not access live setups.
  3. In each release cycle, adding new features and adding new platform/optic module support, we want quick verify that transceiver tuning feature is working properly. If possible better automate this process.

To address above 2 & 3, might I purpose below changes?

  1. we can utilize SAI API get_port_attribute to read back tuning values. Question is how and when to trigger it. A typical scenario is that some ports might behave wired or giving CRCs sometime. If this happens, the fist thing we want check would be making sure serdes are tuned properly. We can discuss it.
  2. Can we add feature in xcvrd to "fake" unplug a SFP? Basically we can mark one or more SFP(s) are unplugged(even they are still in cages), so that we can simulate OIR without physically do that in the lab. With such "fake unplug" feature, we can automate the testing on testbed with few SFPs very quickly.
    Please let me know how you think and we can discuss offline.

Above suggestions could be another separate pull req base on schedule.

Hello @stevenlu99 . Thanks for your feedback.
For the test cases can you please check this change sonic-net/sonic-swss@b3bc42d There is a VS test case that simulates the xcvrd mechanism and checks if SAI is getting programmed in ASIC DB.
Lets also have a discussion offline and raise a pull request separately if we come up with mechanisms for simulation and testing

Modifying media settings file according to latest design

Addressing code review comments

Modified media checker
@lguohan
Copy link
Collaborator

lguohan commented May 19, 2019

retest this please

@dgsudharsan
Copy link
Collaborator Author

dgsudharsan commented May 20, 2019

retest this please

Attaching the test log changes.

@lguohan
Copy link
Collaborator

lguohan commented Jun 8, 2019

retest this please

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.

4 participants