Implement get/set_lpmode API for SFF8472#512
Merged
prgeor merged 2 commits intosonic-net:masterfrom Nov 11, 2024
Merged
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
The lpmode is not supported by SFF8472
c0f5779 to
ba28902
Compare
|
Hi @prgeor could you please help to review this PR? |
Collaborator
|
@mihirpat1 can you please review |
prgeor
approved these changes
Nov 11, 2024
mihirpat1
approved these changes
Nov 11, 2024
Contributor
mihirpat1
left a comment
There was a problem hiding this comment.
Approving with a minor comment
| if len > 0: | ||
| cable_len = len | ||
| cable_type = type | ||
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-common
that referenced
this pull request
Nov 12, 2024
* Add get/set_lpmode API for SFF8472 The lpmode is not supported by SFF8472 * Add unittest for get/set_lpmode for SFF8472 --------- Co-authored-by: Andy Wong <andywong@arista.com>
Collaborator
|
Cherry-pick PR to 202405: #514 |
mssonicbld
pushed a commit
that referenced
this pull request
Nov 12, 2024
* Add get/set_lpmode API for SFF8472 The lpmode is not supported by SFF8472 * Add unittest for get/set_lpmode for SFF8472 --------- Co-authored-by: Andy Wong <andywong@arista.com>
|
Hi @byu343 we saw similar failure in 202311, could you please help to confirm whether this PR could be backported to 202311? |
Contributor
Author
Hi @yaqiangz, yes, this could be backported to 202311 for fixing the issue. |
|
Hi @yxieca could you please help to approve the backport request? |
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-common
that referenced
this pull request
Dec 5, 2024
* Add get/set_lpmode API for SFF8472 The lpmode is not supported by SFF8472 * Add unittest for get/set_lpmode for SFF8472 --------- Co-authored-by: Andy Wong <andywong@arista.com>
Collaborator
|
Cherry-pick PR to 202311: #520 |
mssonicbld
pushed a commit
that referenced
this pull request
Dec 5, 2024
* Add get/set_lpmode API for SFF8472 The lpmode is not supported by SFF8472 * Add unittest for get/set_lpmode for SFF8472 --------- Co-authored-by: Andy Wong <andywong@arista.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implement get/set_lpmode API for SFF8472
Motivation and Context
The cli "sfputil show lpmode" depends on this implemenation for SFP+ ports on Arista platform.
How Has This Been Tested?
Run the cli "sfputil show lpmode" on Arista platform, and check the result is Off for SFP+ ports
Additional Information (Optional)
SFF8472 does not support setting lp mode, so both get_lpmode() and set_lpmode() is returned false. This is consistent with the existing implementation for SFF8436 in https://github.com/sonic-net/sonic-platform-common/blob/master/sonic_platform_base/sonic_xcvr/api/public/sff8436.py#L334, for the condition of "if not self.get_lpmode_support() or not self.get_power_override_support()"