-
Notifications
You must be signed in to change notification settings - Fork 664
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
[intfutil] Display RJ45 port and portchannel speed in 'M' instead of 'G' when it's <= 1000M #2110
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: Kebo Liu <kebol@nvidia.com>
@keboliu could you please update the section "Previous command output"? |
prgeor
reviewed
Apr 7, 2022
Signed-off-by: Kebo Liu <kebol@nvidia.com>
keboliu
changed the title
[intfutil] support display RJ45 port and portchannel speed in 'M' instead of 'G'
[intfutil] support display RJ45 port and portchannel speed in 'M' instead of 'G' when it's <= 1000M
Apr 12, 2022
updated. |
keboliu
changed the title
[intfutil] support display RJ45 port and portchannel speed in 'M' instead of 'G' when it's <= 1000M
[intfutil] Display RJ45 port and portchannel speed in 'M' instead of 'G' when it's <= 1000M
Apr 12, 2022
@prgeor appreciated if you can check again about the updated code. |
prgeor
approved these changes
Apr 18, 2022
This was referenced Apr 20, 2022
liat-grozovik
pushed a commit
that referenced
this pull request
Apr 25, 2022
- What I did In PR #2110 introduced an enhancement to support display port speed with different unit when it is RJ45 ports, however, it only covered the case that the speed was fetched from APPL_DB. Recently there is a change to fetch the speed from STATE_DB in some cases, the same logic also needs to be applied in this case. - How I did it Rename appl_db_port_speed_parse to a more generic name port_speed_parse. Call port_speed_parse when speed is fetched from STATE_DB. In UT test, add port status entries to mocked STATE_DB to cover the logic that get port speed from STATE_DB. - How to verify it UT and test it on platform support RJ45 ports 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
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.
What I did
To follow the convention of 1000Base-T Gigabit Ethernet, display the RJ45 port speed in 'M' if it's <= 1000M, instead of 'G', e.g:
10M, 100M, 1000M;
For the portchannel which is composed of multi RJ45 ports, will also follow the same convention.
How I did it
Verify the port type from the TRANSCEIVER_INFO table, RJ45 port or portchannel will display the port speed in the unit 'M' instead of 'G'
How to verify it
Run "show interface status" command on platforms with RJ45 port to check the port speed is correct.
Previous command output (if the output of a command-line utility has changed)
if the speed is less than 1G then it can not be displayed correctly.
New command output (if the output of a command-line utility has changed)
admin@sonic:/# show in st