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

[Mellanox] [202205] [Backport] Use sdk sysfs instead of ethtool (#12480) #12603

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

Junchao-Mellanox
Copy link
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Nov 4, 2022

Backport: #12480

Why I did it

Currently, implementation:

  • Reading EEPROM: via ethtool
  • Writing EEPROM: via mlxreg tool.

The problem is that spawning new process of ethtool/mlxreg is very slow. To optimize the performance, this PR will use SDK provided sys fs for EEPROM reading/writing.

How I did it

Replace the logic of sfp.read_eeprom and sfp.write_eeprom by SDK sys fs.

How to verify it

Manual test
Unit test cases (new test case added)
sonic-mgmt regression

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

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

Conflicts:
	platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py
@Junchao-Mellanox Junchao-Mellanox changed the title [Mellanox] [202205] Use sdk sysfs instead of ethtool (#12480) [Mellanox] [202205] [Backport] Use sdk sysfs instead of ethtool (#12480) Nov 4, 2022
@Junchao-Mellanox
Copy link
Collaborator Author

Hi @yxieca, could you please help review and merge?

@yxieca yxieca merged commit b57b173 into sonic-net:202205 Nov 10, 2022
@Junchao-Mellanox Junchao-Mellanox deleted the sfp_eeprom_202205 branch June 12, 2023 04:38
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.

3 participants