Skip to content

[Mellanox] Use sysfs for sfp reset/LPM/presence#14130

Merged
liat-grozovik merged 5 commits intosonic-net:masterfrom
Junchao-Mellanox:sfp_sysfs
May 24, 2023
Merged

[Mellanox] Use sysfs for sfp reset/LPM/presence#14130
liat-grozovik merged 5 commits intosonic-net:masterfrom
Junchao-Mellanox:sfp_sysfs

Conversation

@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Mar 7, 2023

Depending on new Nvidia SDK/FW #15072, please don't merge until new SDK/FW merge.

Why I did it

The current implementation of SFP reset, LPM, present relies on SDK API. This PR moves the implementation to SDK sysfs. By this PR, it gains following benefit:

  1. SDK sysfs provides better performance.
  2. Host side and container side share the same code.
  3. Code is much cleaner.

How I did it

Use SDK sysfs to implement SFP reset, LPM, present.

How to verify it

  1. Manual test.
  2. Unit test.

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

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

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. 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)

@Junchao-Mellanox Junchao-Mellanox requested a review from keboliu March 7, 2023 09:26
@Junchao-Mellanox Junchao-Mellanox marked this pull request as draft March 7, 2023 09:26
@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator Author

Depending on new SDK/FW

@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Junchao-Mellanox Junchao-Mellanox marked this pull request as ready for review May 5, 2023 06:15
@Junchao-Mellanox Junchao-Mellanox requested a review from prgeor May 5, 2023 06:16
@keboliu keboliu requested a review from qiluo-msft May 23, 2023 03:14
@liat-grozovik liat-grozovik merged commit 18cf719 into sonic-net:master May 24, 2023
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request May 25, 2023
- Why I did it
The current implementation of SFP reset, LPM, present relies on SDK API. This PR moves the implementation to SDK sysfs. By this PR, it gains following benefit:
1. SDK sysfs provides better performance.
2. Host side and container side share the same code.
3. Code is much cleaner.

- How I did it
Use SDK sysfs to implement SFP reset, LPM, present.

- How to verify it
1. Manual test.
2. Unit test.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202211: #15215

keboliu added a commit to keboliu/sonic-buildimage that referenced this pull request Nov 2, 2023
liat-grozovik pushed a commit that referenced this pull request Nov 27, 2023
- Why I did it
The current low power mode setting implementation requests the user to set the port to admin down first before toggling LP mode, this is not backward compatible, now revert it to the old way so that the user can toggle the LP mode regardless of the port admin status.

- How I did it
Revert the recent changes related to LPM in PR #14130 and #16545

- How to verify it
Run all sfputil and SFP platform API related tests on all the Mellanox platforms.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Nov 30, 2023
- Why I did it
The current low power mode setting implementation requests the user to set the port to admin down first before toggling LP mode, this is not backward compatible, now revert it to the old way so that the user can toggle the LP mode regardless of the port admin status.

- How I did it
Revert the recent changes related to LPM in PR sonic-net#14130 and sonic-net#16545

- How to verify it
Run all sfputil and SFP platform API related tests on all the Mellanox platforms.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
yxieca pushed a commit that referenced this pull request Dec 4, 2023
- Why I did it
The current low power mode setting implementation requests the user to set the port to admin down first before toggling LP mode, this is not backward compatible, now revert it to the old way so that the user can toggle the LP mode regardless of the port admin status.

- How I did it
Revert the recent changes related to LPM in PR #14130 and #16545

- How to verify it
Run all sfputil and SFP platform API related tests on all the Mellanox platforms.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
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