-
Notifications
You must be signed in to change notification settings - Fork 672
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
[dpb|config] Fix the validation logic of breakout mode #1440
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
4 tasks
4 tasks
zhenggen-xu
previously approved these changes
Feb 20, 2021
lguohan
reviewed
Feb 23, 2021
can you check why unit test is still failling? |
lguohan
reviewed
Feb 23, 2021
lguohan
reviewed
Feb 23, 2021
lguohan
reviewed
Feb 23, 2021
…t cases Signed-off-by: Sangita Maity <[email protected]>
Signed-off-by: Sangita Maity <[email protected]>
Signed-off-by: Guohan Lu <[email protected]>
Signed-off-by: Guohan Lu <[email protected]>
lguohan
approved these changes
Feb 23, 2021
This was referenced Feb 24, 2021
lguohan
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Feb 26, 2021
…pport a… (#6831) To fix [DPB| wrong aliases for interfaces](#6024) issue, implimented flexible alias support [design doc](sonic-net/SONiC#749) > [[dpb|config] Fix the validation logic of breakout mode](sonic-net/sonic-utilities#1440) depends on this #### How I did it 1. Removed `"alias_at_lanes"` from port-configuration file(i.e. platfrom.json) 2. Added dictionary to "breakout_modes" values. This defines the breakout modes available on the platform for this parent port, and it maps to the alias list. The alias list presents the alias names for individual ports in order under this breakout mode. ``` { "interfaces": { "Ethernet0": { "index": "1,1,1,1", "lanes": "0,1,2,3", "breakout_modes": { "1x100G[40G]": ["Eth1"], "2x50G": ["Eth1/1", "Eth1/2"], "4x25G[10G]": ["Eth1/1", "Eth1/2", "Eth1/3", "Eth1/4"], "2x25G(2)+1x50G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"], "1x50G(2)+2x25G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"] } } } ``` #### How to verify it `config interface breakout` Signed-off-by: Sangita Maity <[email protected]>
anand-kumar-subramanian
pushed a commit
to anand-kumar-subramanian/sonic-utilities
that referenced
this pull request
Mar 2, 2021
As per latest update in DPB DOC, fixed this bug previously we had string value in "breakout_modes" key so it was not matching the whole string, But after the update via, now "breakout_modes" contain a dictionary where key is the breakout_mode and value is the alias. So we can easily check whether the key is present or not. Signed-off-by: Sangita Maity <[email protected]> Co-authored-by: Guohan Lu <[email protected]>
praveen-li
pushed a commit
to praveen-li/sonic-utilities
that referenced
this pull request
Jun 8, 2021
As per latest update in DPB DOC, fixed this bug previously we had string value in "breakout_modes" key so it was not matching the whole string, But after the update via, now "breakout_modes" contain a dictionary where key is the breakout_mode and value is the alias. So we can easily check whether the key is present or not. Signed-off-by: Sangita Maity <[email protected]> Co-authored-by: Guohan Lu <[email protected]>
praveen-li
pushed a commit
to praveen-li/sonic-buildimage
that referenced
this pull request
Jun 8, 2021
…pport a… (sonic-net#6831) To fix [DPB| wrong aliases for interfaces](sonic-net#6024) issue, implimented flexible alias support [design doc](sonic-net/SONiC#749) > [[dpb|config] Fix the validation logic of breakout mode](sonic-net/sonic-utilities#1440) depends on this 1. Removed `"alias_at_lanes"` from port-configuration file(i.e. platfrom.json) 2. Added dictionary to "breakout_modes" values. This defines the breakout modes available on the platform for this parent port, and it maps to the alias list. The alias list presents the alias names for individual ports in order under this breakout mode. ``` { "interfaces": { "Ethernet0": { "index": "1,1,1,1", "lanes": "0,1,2,3", "breakout_modes": { "1x100G[40G]": ["Eth1"], "2x50G": ["Eth1/1", "Eth1/2"], "4x25G[10G]": ["Eth1/1", "Eth1/2", "Eth1/3", "Eth1/4"], "2x25G(2)+1x50G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"], "1x50G(2)+2x25G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"] } } } ``` `config interface breakout` Signed-off-by: Sangita Maity <[email protected]> device/mellanox/x86_64-mlnx_msn2700-r0/platform.json
praveen-li
pushed a commit
to praveen-li/sonic-buildimage
that referenced
this pull request
Jun 25, 2021
…pport a… (sonic-net#6831) To fix [DPB| wrong aliases for interfaces](sonic-net#6024) issue, implimented flexible alias support [design doc](sonic-net/SONiC#749) > [[dpb|config] Fix the validation logic of breakout mode](sonic-net/sonic-utilities#1440) depends on this 1. Removed `"alias_at_lanes"` from port-configuration file(i.e. platfrom.json) 2. Added dictionary to "breakout_modes" values. This defines the breakout modes available on the platform for this parent port, and it maps to the alias list. The alias list presents the alias names for individual ports in order under this breakout mode. ``` { "interfaces": { "Ethernet0": { "index": "1,1,1,1", "lanes": "0,1,2,3", "breakout_modes": { "1x100G[40G]": ["Eth1"], "2x50G": ["Eth1/1", "Eth1/2"], "4x25G[10G]": ["Eth1/1", "Eth1/2", "Eth1/3", "Eth1/4"], "2x25G(2)+1x50G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"], "1x50G(2)+2x25G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"] } } } ``` `config interface breakout` Signed-off-by: Sangita Maity <[email protected]> device/mellanox/x86_64-mlnx_msn2700-r0/platform.json
carl-nokia
pushed a commit
to carl-nokia/sonic-buildimage
that referenced
this pull request
Aug 7, 2021
…pport a… (sonic-net#6831) To fix [DPB| wrong aliases for interfaces](sonic-net#6024) issue, implimented flexible alias support [design doc](sonic-net/SONiC#749) > [[dpb|config] Fix the validation logic of breakout mode](sonic-net/sonic-utilities#1440) depends on this #### How I did it 1. Removed `"alias_at_lanes"` from port-configuration file(i.e. platfrom.json) 2. Added dictionary to "breakout_modes" values. This defines the breakout modes available on the platform for this parent port, and it maps to the alias list. The alias list presents the alias names for individual ports in order under this breakout mode. ``` { "interfaces": { "Ethernet0": { "index": "1,1,1,1", "lanes": "0,1,2,3", "breakout_modes": { "1x100G[40G]": ["Eth1"], "2x50G": ["Eth1/1", "Eth1/2"], "4x25G[10G]": ["Eth1/1", "Eth1/2", "Eth1/3", "Eth1/4"], "2x25G(2)+1x50G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"], "1x50G(2)+2x25G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"] } } } ``` #### How to verify it `config interface breakout` Signed-off-by: Sangita Maity <[email protected]>
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: Sangita Maity [email protected]
What I did
As per latest update in DPB DOC, fixed this bug
previously we had string value in "breakout_modes" key so it was not matching the whole string, But after the update via, now "breakout_modes" contain a dictionary where
key
is thebreakout_mode
and value is thealias
. So we can easily check whether the key is present or not.How I did it
checked whether the user-specified breakout mode key is present under "breakout_modes" in
platform.json
.How to verify it
If you only have 1x100G[50G,40G,25G,10G], the below CLI command should fail:
config interface breakout Ethernet96 1x100G
as it matches the whole key.it matches the whole key.