-
Notifications
You must be signed in to change notification settings - Fork 179
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
Tx/Rx power values should be rounded up to 3 decimal places #432
Merged
Conversation
This file contains 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
Signed-off-by: Mihir Patel <[email protected]>
prgeor
approved these changes
Feb 1, 2024
@StormLiangMS, @yxieca - Can you please help in merging this to 202205, 202305 and 202311? |
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-common
that referenced
this pull request
Feb 1, 2024
…t#432) Signed-off-by: Mihir Patel <[email protected]>
Cherry-pick PR to 202311: #433 |
mssonicbld
pushed a commit
that referenced
this pull request
Feb 1, 2024
Signed-off-by: Mihir Patel <[email protected]>
mssonicbld
added
Included in 202311 Branch
and removed
Created PR to 202311 Branch
labels
Feb 1, 2024
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-common
that referenced
this pull request
Feb 4, 2024
…t#432) Signed-off-by: Mihir Patel <[email protected]>
Cherry-pick PR to 202305: #437 |
mssonicbld
pushed a commit
that referenced
this pull request
Feb 4, 2024
Signed-off-by: Mihir Patel <[email protected]>
mssonicbld
added
Included in 202305 Branch
and removed
Created PR to 202305 Branch
labels
Feb 4, 2024
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-platform-common
that referenced
this pull request
Oct 25, 2024
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
It seems that currently, Tx/Rx power values are not rounded to a specific decimal value. We need to round the value up to 3 decimal places.
MSFT ADO - 26621895
Following is the snippet for the same
Motivation and Context
This issue was introduced with #377 wherein the function
mw_to_dbm
was called for different types of SFPs.However, the function
mw_to_dbm
doesn't perform rounding of the values and hence, the TX and RX power show with more precision.Hence, I have now modified the function
mw_to_dbm
to round values up to 3 decimal places.How Has This Been Tested?
The commands
sfputil show eeprom -d -p PORT_NAME
andshow interfaces transceiver eeprom -d PORT_NAME
were tested on the following types of transceivers and Tx/Rx power values were ensured to be within 3 digits.Following is the snippet of SFP+ testing
Additional Information (Optional)