Skip to content
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|master] Update Dynamic Port Breakout Logic for flexible alias support a… #6831

Merged
merged 5 commits into from
Feb 26, 2021

Conversation

samaity
Copy link
Collaborator

@samaity samaity commented Feb 20, 2021

Signed-off-by: Sangita Maity samaity@linkedin.com

Why I did it

To fix DPB| wrong aliases for interfaces issue, implimented flexible alias support design doc

[dpb|config] Fix the validation logic of breakout mode 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

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

…nd related Test cases

Signed-off-by: Sangita Maity <samaity@linkedin.com>
src/sonic-config-engine/portconfig.py Show resolved Hide resolved
src/sonic-config-engine/portconfig.py Outdated Show resolved Hide resolved
src/sonic-config-engine/portconfig.py Outdated Show resolved Hide resolved
src/sonic-config-engine/portconfig.py Outdated Show resolved Hide resolved
Sangita Maity added 2 commits February 20, 2021 16:08
Signed-off-by: Sangita Maity <samaity@linkedin.com>
Signed-off-by: Sangita Maity <samaity@linkedin.com>
zhenggen-xu
zhenggen-xu previously approved these changes Feb 21, 2021
@lguohan
Copy link
Collaborator

lguohan commented Feb 22, 2021

@samaity , what is the build issue?

@yxieca
Copy link
Contributor

yxieca commented Feb 22, 2021

There seems to be a systematic error with the naming when breakout was done at half speeds (50G).

E.g. when 2 interfaces break to 50G, the second interface should be Ethx/3 or etpxc

This error is also noticed in PR comment.

yxieca
yxieca previously requested changes Feb 22, 2021
Copy link
Contributor

@yxieca yxieca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the breakout numbering when half speed breakout is involved.

@zhenggen-xu
Copy link
Collaborator

zhenggen-xu commented Feb 23, 2021

There seems to be a systematic error with the naming when breakout was done at half speeds (50G).

E.g. when 2 interfaces break to 50G, the second interface should be Ethx/3 or etpxc

This error is also noticed in PR comment.

Actually according to this doc, which you submitted, it was etpxb instead of etpxc: :-)
https://github.com/Azure/SONiC/blob/master/doc/sonic-port-name.md

Anyway, this alias list is really for box vendor or user to define and we don't limit to anything as for the design. And for us, we prefer to have 1/1 and 1/2. and this is inline with one of the traditional vendors.

@samaity
Copy link
Collaborator Author

samaity commented Feb 23, 2021

To give a brief, we fixed the breakout numbering when a half-speed breakout (i.e. 2x50G) is involved for Barefoot and VS platform by modifying platform.json as requested

Barefoot

"breakout_modes": {
                "1x100G[40G]": ["Ethernet0"],
                "2x50G": ["Ethernet0", "Ethernet2"],

vs

"breakout_modes": {
                "1x100G[40G]": ["fortyGigE0/0"],
                "2x50G": ["fortyGigE0/0", "fortyGigE0/2"],

For other platforms, we are keeping it as it is. Kindly let us know if any modification is needed after the latest one. Thanks!

…form

Signed-off-by: Sangita Maity <samaity@linkedin.com>
@samaity
Copy link
Collaborator Author

samaity commented Feb 25, 2021

retest this please

@lguohan
Copy link
Collaborator

lguohan commented Feb 25, 2021

can you update the sonic utilties since the fix is merged?

@jleveque
Copy link
Contributor

can you update the sonic utilties since the fix is merged?

I have advanced the submodule further in my PR: #6874

@jleveque jleveque mentioned this pull request Feb 25, 2021
4 tasks
@jleveque
Copy link
Contributor

@samaity: There are still build failures. Can you please check?

@lguohan lguohan merged commit 18263c9 into sonic-net:master Feb 26, 2021
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 <samaity@linkedin.com>
	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 <samaity@linkedin.com>
	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 <samaity@linkedin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DPB] wrong aliases for interfaces
6 participants