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

[202311] Support reading/writing module EEPROM data by page and offset (#3008) #3073

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

Junchao-Mellanox
Copy link
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Dec 8, 2023

Backport PR to 202311: #3008

What I did

Add two CLIs:

  • sfputil read-eeprom
  • sfputil write-eeprom

Allow user to read/write EEPROM by page and offset

How I did it

See design:
sonic-net/SONiC#1475

How to verify it

Unit test

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

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

sfputil read-eeprom Ethernet0 0 100 2
00000064 4a 44                                            |..|
sfputil read-eeprom Ethernet0 0 0 32
00000000 11 08 06 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
sfputil read-eeprom Ethernet0 0 100 2 --no-format
4a44

@Junchao-Mellanox Junchao-Mellanox changed the title Support reading/writing module EEPROM data by page and offset (#3008) [202305] Support reading/writing module EEPROM data by page and offset (#3008) Dec 8, 2023
@Junchao-Mellanox Junchao-Mellanox changed the title [202305] Support reading/writing module EEPROM data by page and offset (#3008) [202311] Support reading/writing module EEPROM data by page and offset (#3008) Dec 8, 2023
@Junchao-Mellanox
Copy link
Collaborator Author

/azpw run Azure.sonic-utilities

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-utilities

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

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@prgeor please approve the PR as well

…net#3008)

* Support reading/writing module EEPROM data by page and offset

* Fix unit test issue

* Fix unit test issue

* Fix review comment

* Update command ref

* Fix format

* Update main.py

* Fix review comments

* Fix review comment

* Remove un-intended change

* Update Command-Reference.md

* Update Command-Reference.md

* Fix review comments

* Fix review comments

* User click.IntRange to avoid duplicate validation

* Fix review comments

* Update sfputil_test.py
@liat-grozovik
Copy link
Collaborator

@prgeor can you approve the backport one as well?

@liat-grozovik
Copy link
Collaborator

@prgeor @keboliu as the original reviewers. can you please review and approve?

@keboliu
Copy link
Collaborator

keboliu commented Jan 16, 2024

@yxieca @prgeor would you please approve and merge? this is a backport PR.

@yxieca yxieca merged commit 7a242ee into sonic-net:202311 Jan 19, 2024
5 checks passed
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.

6 participants