-
Notifications
You must be signed in to change notification settings - Fork 673
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
[port] Fix port speed set #1952
Merged
yxieca
merged 3 commits into
sonic-net:master
from
mykolaxgerasymenko:mykolag/wrong_port_speed_set
Dec 5, 2021
Merged
[port] Fix port speed set #1952
yxieca
merged 3 commits into
sonic-net:master
from
mykolaxgerasymenko:mykolag/wrong_port_speed_set
Dec 5, 2021
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: Mykola Gerasymenko <mykolax.gerasymenko@intel.com>
@andriymoroz-mlnx @yxieca Please review. |
globaltrouble
approved these changes
Dec 1, 2021
globaltrouble
suggested changes
Dec 1, 2021
globaltrouble
approved these changes
Dec 1, 2021
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-utilities |
Commenter does not have sufficient privileges for PR 1952 in repo Azure/sonic-utilities |
@andriymoroz-mlnx @yxieca please review. |
@jleveque @Junchao-Mellanox please review. |
@jleveque @Junchao-Mellanox Could you please review? |
yxieca
approved these changes
Dec 5, 2021
5 tasks
Closed
5 tasks
This was referenced Dec 8, 2021
abdosi
pushed a commit
that referenced
this pull request
Dec 8, 2021
What I did Wrong port speed is set if included as a substring in a speed literal. For example if we have a valid supported speeds for a port with 4 lanes: 40000 and 100000. Then if we try to set 4000. sudo config interface speed Ethernet0 4000 As a result, we will get a wrong set speed 4G: dut:~$ show interfaces status Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC --------- ------ ------ ---- ---- -------- ----- ----- ------ ----------- ----- Ethernet0 0,1,2,3 4G 9100 rs Ethernet1/1 routed up up QSFP28 or later off How I did it Fixed finding the target (set) speed in the supported speeds list. How to verify it Set the wrong speed, which included as a substring in a speed literal. For example, for a speed 40000 it is 4000. If the wrong speed is set, an error message should appear: admin@sonic:~$ sudo config interface speed Ethernet0 4000 Invalid speed specified: 4000 Valid speeds:40000,100000 Only speeds from the list of "Valid speeds" have been successfully set. sudo config interface speed Ethernet0 40000 Signed-off-by: Mykola Gerasymenko <mykolax.gerasymenko@intel.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.
Signed-off-by: Mykola Gerasymenko mykolax.gerasymenko@intel.com
What I did
Wrong port speed is set if included as a substring in a speed literal.
For example if we have a valid supported speeds for a port with 4 lanes: 40000 and 100000. Then if we try to set 4000.
sudo config interface speed Ethernet0 4000
As a result, we will get a wrong set speed 4G:
How I did it
Fixed finding the target (set) speed in the supported speeds list.
How to verify it
Set the wrong speed, which included as a substring in a speed literal.
For example, for a speed 40000 it is 4000.
If the wrong speed is set, an error message should appear:
Only speeds from the list of "Valid speeds" have been successfully set.
sudo config interface speed Ethernet0 40000