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] wrong aliases for interfaces #6024

Closed
vadymhlushko-mlnx opened this issue Nov 24, 2020 · 24 comments · Fixed by #6831
Closed

[DPB] wrong aliases for interfaces #6024

vadymhlushko-mlnx opened this issue Nov 24, 2020 · 24 comments · Fixed by #6831
Assignees
Labels
P1 Priority of the issue, lower than P0 Port Breakout 🔱

Comments

@vadymhlushko-mlnx
Copy link
Contributor

Description
Interface has a wrong alias after successful dynamic port breakout command

Steps to reproduce the issue:

  1. show interfaces status
  2. config interface breakout Ethernet4 2x50G
  3. show interfaces status

Describe the results you received:

root@arc-switch1004:~# show interfaces status
  Interface            Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  ---------------  -------  -----  -----  -------  ------  ------  -------  ------  ----------
  Ethernet0          0,1,2,3     100G   9100    N/A     etp1  routed    down       up     N/A         N/A
  Ethernet4          4,5,6,7     100G   9100    N/A     etp2  routed    down       up     N/A         N/A
  Ethernet8        8,9,10,11     100G   9100    N/A     etp3  routed    down       up     N/A         N/A
 Ethernet12      12,13,14,15     100G   9100    N/A     etp4  routed    down       up     N/A         N/A
....
root@arc-switch1004:~# config interface breakout Ethernet4 2x50G -y
root@arc-switch1004:~# show inter sta
  Interface            Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  ---------------  -------  -----  -----  -------  ------  ------  -------  ------  ----------
  Ethernet0          0,1,2,3     100G   9100    N/A     etp1  routed    down       up     N/A         N/A
  Ethernet4              4,5      50G   9100    N/A    etp2a  routed    down       up     N/A         N/A
  Ethernet6              6,7      50G   9100    N/A    etp2c  routed    down       up     N/A         N/A
  Ethernet8        8,9,10,11     100G   9100    N/A     etp3  routed    down       up     N/A         N/A
...
root@arc-switch1004:~# config interface breakout Ethernet4 1x100G[40G] -y
root@arc-switch1004:~# show inter sta
  Interface            Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  ---------------  -------  -----  -----  -------  ------  ------  -------  ------  ----------
  Ethernet0          0,1,2,3     100G   9100    N/A     etp1  routed    down       up     N/A         N/A
  Ethernet4          4,5,6,7     100G   9100    N/A    etp2a  routed    down       up     N/A         N/A
  Ethernet8        8,9,10,11     100G   9100    N/A     etp3  routed    down       up     N/A         N/A
....

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**
root@arc-switch1004:/home/admin# show version

SONiC Software Version: SONiC.SONIC.master.38-5410290_Internal
Distribution: Debian 10.6
Kernel: 4.19.0-9-2-amd64
Build commit: 5410290b
Build date: Mon Nov 23 17:35:15 UTC 2020
Built by: sw-r2d2-bot@r-build-sonic-ci02

Platform: x86_64-mlnx_msn2700-r0
HwSKU: ACS-MSN2700
ASIC: mellanox
Serial Number: MT1822K07823
Uptime: 14:30:03 up  2:18,  1 user,  load average: 2.55, 2.48, 2.52

Docker images:
REPOSITORY                    TAG                                IMAGE ID            SIZE
docker-syncd-mlnx             SONIC.master.38-5410290_Internal   f5095d1abfb4        586MB
docker-syncd-mlnx             latest                             f5095d1abfb4        586MB
docker-snmp                   SONIC.master.38-5410290_Internal   0a3cbcf521e2        478MB
docker-snmp                   latest                             0a3cbcf521e2        478MB
docker-teamd                  SONIC.master.38-5410290_Internal   f294c5873c25        485MB
docker-teamd                  latest                             f294c5873c25        485MB
docker-sonic-mgmt-framework   SONIC.master.38-5410290_Internal   8d923d051f4f        599MB
docker-sonic-mgmt-framework   latest                             8d923d051f4f        599MB
docker-nat                    SONIC.master.38-5410290_Internal   03c1edf1c093        488MB
docker-nat                    latest                             03c1edf1c093        488MB
docker-router-advertiser      SONIC.master.38-5410290_Internal   97880fd96c53        442MB
docker-router-advertiser      latest                             97880fd96c53        442MB
docker-platform-monitor       SONIC.master.38-5410290_Internal   7c08d3489769        647MB
docker-platform-monitor       latest                             7c08d3489769        647MB
docker-database               SONIC.master.38-5410290_Internal   81dac0700284        442MB
docker-database               latest                             81dac0700284        442MB
docker-lldp                   SONIC.master.38-5410290_Internal   9cc6abebc125        516MB
docker-lldp                   latest                             9cc6abebc125        516MB
docker-orchagent              SONIC.master.38-5410290_Internal   93fb40536a57        499MB
docker-orchagent              latest                             93fb40536a57        499MB
docker-dhcp-relay             SONIC.master.38-5410290_Internal   591fabc41a10        449MB
docker-dhcp-relay             latest                             591fabc41a10        449MB
docker-sonic-telemetry        SONIC.master.38-5410290_Internal   4fe1116e6d53        511MB
docker-sonic-telemetry        latest                             4fe1116e6d53        511MB
docker-fpm-frr                SONIC.master.38-5410290_Internal   5c89a49d5d80        501MB
docker-fpm-frr                latest                             5c89a49d5d80        501MB
docker-sflow                  SONIC.master.38-5410290_Internal   1b92bd1f40aa        486MB
docker-sflow                  latest                             1b92bd1f40aa        486MB

**Attach debug file `sudo generate_dump`:**
[sonic_dump_arc-switch1004_20201124_130354.tar.gz](https://github.com/Azure/sonic-buildimage/files/5590530/sonic_dump_arc-switch1004_20201124_130354.tar.gz)

@vadymhlushko-mlnx
Copy link
Contributor Author

sudo generate_dump
sonic_dump_arc-switch1004_20201124_130354.tar.gz

@anshuv-mfst
Copy link

Hi @zhenggen-xu , @praveen-li - Could you please look into this issue.

Thanks.

@praveen-li
Copy link
Member

@zhenggen-xu @samaity : I recall aliases are mentioned in mlnx platform.json as displayed. Do we need to do anything here or platform.json needs the changes.

@zhenggen-xu
Copy link
Collaborator

@vadymhlushko-mlnx Please include the platform.json of the platform , and also specify your expectations.

@vadymhlushko-mlnx
Copy link
Contributor Author

@vadymhlushko-mlnx Please include the platform.json of the platform , and also specify your expectations.

[DPB] added capability files for SN2700 platform

@zhenggen-xu
Copy link
Collaborator

I am not sure what is the issue and what is expected from you here ?

@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Jan 6, 2021 via email

@zhenggen-xu
Copy link
Collaborator

OK, if that was the case, then it was as designed. we will only use the aliases defined in platform.json for breaking out to any mode (include the one port mode in the "unbreak out case"). I guess the question was, where did the original alias eth2 coming from?

If we want to support different aliases for different breakout mode, we need change the platform.json format and parsing logic for this new requirement.

@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Jan 7, 2021 via email

@vadymhlushko-mlnx
Copy link
Contributor Author

@zhenggen-xu, @liat-grozovik
The problem is:

1 . Before the breakout alias was etp2:

  Interface            Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  ---------------  -------  -----  -----  -------  ------  ------  -------  ------  ----------
  Ethernet4          4,5,6,7     100G   9100    N/A     etp2  routed    down       up     N/A         N/A
  1. After the breakout command config interface breakout Ethernet4 2x50G -y
    Aliases are etp2a and etp2c. The first question is why not etp2a and etp2b?
root@arc-switch1004:~# show inter sta
  Interface            Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  ---------------  -------  -----  -----  -------  ------  ------  -------  ------  ----------
  Ethernet4              4,5      50G   9100    N/A    etp2a  routed    down       up     N/A         N/A
  Ethernet6              6,7      50G   9100    N/A    etp2c  routed    down       up     N/A         N/A
  1. After the unbreakout command config interface breakout Ethernet4 1x100G[40G] -y
    Alias is etp2a, the second question is - why the alias is not etp2 as it was before the breakout (1 step).
  Interface            Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  ---------------  -------  -----  -----  -------  ------  ------  -------  ------  ----------
  Ethernet4          4,5,6,7     100G   9100    N/A    etp2a  routed    down       up     N/A         N/A

@zhenggen-xu
Copy link
Collaborator

@vadymhlushko-mlnx As mentioned, I was not sure where you get the etp2 from? was it inherited from old configuration? If so, this is expected and the old configuration was not compatible with platform.json. And In the DPB design, we only use the aliases from the platform.json. And if we expect to have different alias names for different breakout modes for the same interface say: Ethernet4, we would need add this capability in platform.json and the parsing logic.

@vadymhlushko-mlnx
Copy link
Contributor Author

vadymhlushko-mlnx commented Jan 26, 2021

@praveen-li, @zhenggen-xu, @samaity

As it turned out recently, this issue with aliases naming is not only a cosmetic problem that you can see when you execute the
show interfaces status command.

In SONiC we have a flow to generate a /etc/sonic/config_db.json from /etc/sonic/minigraph.xml by using the command config load_minigraph.

/etc/sonic/minigraph.xml generated by sonic-mgmt script ./testbed-cli.sh gen-mg ${SWITCH}-${TOPOLOGY} lab vault

minigraph.xml have the aliases for interfaces without 'a' postfix - example etp1, etp2.

Somewhere in the middle of config load_minigraph logic, before applying the /etc/sonic/config_db.json to the switch, the DPB logic (introduced in PR-3909) change the aliases for interfaces (e.g. etp1 -> etp1a). After that, we have /etc/sonic/config_db.json with misconfiguration, part of this file has etp1 (without a postfix) aliases, the other part has an a postfix for aliases - etp1a.

After that, show interfaces status have the next output

root@arc-switch1038:/home/admin# show interfaces status
Traceback (most recent call last):
  File "/usr/local/bin/intfutil", line 521, in <module>
    main()
  File "/usr/local/bin/intfutil", line 513, in main
    interface_stat.display_intf_status()
  File "/usr/local/bin/intfutil", line 354, in display_intf_status
    self.get_intf_status()
  File "/usr/local/lib/python3.7/dist-packages/utilities_common/multi_asic.py", line 137, in wrapped_run_on_all_asics
    func(self,  *args, **kwargs)
  File "/usr/local/bin/intfutil", line 435, in get_intf_status
    self.portchannel_speed_dict = po_speed_dict(self.po_int_dict, self.db)
  File "/usr/local/bin/intfutil", line 249, in po_speed_dict
    interface_speed = '{}G'.format(interface_speed[:-3])
TypeError: 'NoneType' object is not subscriptable

In the APP_DB we have misconfiguration:

root@arc-switch1038:/home/admin# redis-cli -n 0 KEYS *PORT_TABLE*
 1) "_PORT_TABLE:Ethernet52"
 2) "_PORT_TABLE:Ethernet56"
 3) "PORT_TABLE:Ethernet40"
 4) "PORT_TABLE:Ethernet68"
 5) "_PORT_TABLE:Ethernet0"
 6) "PORT_TABLE:Ethernet84"
 7) "PORT_TABLE:Ethernet24"
 8) "_PORT_TABLE:Ethernet44"
 9) "PORT_TABLE:Ethernet120"
10) "PORT_TABLE:Ethernet96"
11) "_PORT_TABLE:Ethernet40"
12) "PORT_TABLE:etp31"
13) "_PORT_TABLE:Ethernet8"
14) "_PORT_TABLE:Ethernet4"
15) "PORT_TABLE:Ethernet12"
16) "PORT_TABLE:Ethernet20"
17) "PORT_TABLE:Ethernet28"
18) "_PORT_TABLE:Ethernet60"
19) "PORT_TABLE:Ethernet112"
20) "PORT_TABLE:Ethernet16"
21) "PORT_TABLE:etp29"
22) "PORT_TABLE:Ethernet4"
23) "PORT_TABLE:Ethernet76"
24) "PORT_TABLE:Ethernet92"
25) "PORT_TABLE:Ethernet116"
26) "_PORT_TABLE:Ethernet12"
27) "PORT_TABLE:Ethernet104"
28) "PORT_TABLE:Ethernet88"
29) "_PORT_TABLE:Ethernet48"
30) "PORT_TABLE:Ethernet48"
31) "PORT_TABLE:Ethernet108"
32) "PORT_TABLE:Ethernet124"
33) "_PORT_TABLE:Ethernet28"
34) "PORT_TABLE:Ethernet60"
35) "PORT_TABLE:Ethernet52"
36) "PORT_TABLE:Ethernet44"
37) "PORT_TABLE:Ethernet0"
38) "_PORT_TABLE:Ethernet32"
39) "_PORT_TABLE:Ethernet64"
40) "PORT_TABLE:Ethernet32"
41) "PORT_TABLE:Ethernet100"
42) "_PORT_TABLE:Ethernet24"
43) "PORT_TABLE:Ethernet80"
44) "PORT_TABLE:Ethernet56"
45) "PORT_TABLE:PortConfigDone"
46) "PORT_TABLE:Ethernet36"
47) "_PORT_TABLE:Ethernet36"
48) "_PORT_TABLE:Ethernet20"
49) "PORT_TABLE:Ethernet8"
50) "PORT_TABLE:etp30"
51) "PORT_TABLE:etp32"
52) "_PORT_TABLE:Ethernet16"
53) "PORT_TABLE:Ethernet72"
54) "PORT_TABLE_KEY_SET"
55) "PORT_TABLE:Ethernet64"
root@arc-switch1038:/home/admin# show version

SONiC Software Version: SONiC.SONIC.master.64-46b3bd5_Internal
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: 46b3bd55
Build date: Sun Jan 24 12:16:00 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci02

Platform: x86_64-mlnx_msn3700-r0
HwSKU: ACS-MSN3700
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1851X02961
Uptime: 15:02:33 up 37 min,  1 user,  load average: 5.11, 2.69, 1.70

Docker images:
REPOSITORY                    TAG                                IMAGE ID            SIZE
docker-syncd-mlnx             SONIC.master.64-46b3bd5_Internal   095d22775945        539MB
docker-syncd-mlnx             latest                             095d22775945        539MB
docker-snmp                   SONIC.master.64-46b3bd5_Internal   09cab211ff77        435MB
docker-snmp                   latest                             09cab211ff77        435MB
docker-sonic-mgmt-framework   SONIC.master.64-46b3bd5_Internal   f48021f6d2cc        612MB
docker-sonic-mgmt-framework   latest                             f48021f6d2cc        612MB
docker-nat                    SONIC.master.64-46b3bd5_Internal   e2a9d271e4a8        407MB
docker-nat                    latest                             e2a9d271e4a8        407MB
docker-router-advertiser      SONIC.master.64-46b3bd5_Internal   c3ffe156b7cd        394MB
docker-router-advertiser      latest                             c3ffe156b7cd        394MB
docker-platform-monitor       SONIC.master.64-46b3bd5_Internal   70bd029ed33a        684MB
docker-platform-monitor       latest                             70bd029ed33a        684MB
docker-lldp                   SONIC.master.64-46b3bd5_Internal   9a625f8b36e9        434MB
docker-lldp                   latest                             9a625f8b36e9        434MB
docker-database               SONIC.master.64-46b3bd5_Internal   d88f98696c3b        394MB
docker-database               latest                             d88f98696c3b        394MB
docker-orchagent              SONIC.master.64-46b3bd5_Internal   b20616415289        423MB
docker-orchagent              latest                             b20616415289        423MB
docker-macsec                 SONIC.master.64-46b3bd5_Internal   c26332217a3f        408MB
docker-macsec                 latest                             c26332217a3f        408MB
docker-dhcp-relay             SONIC.master.64-46b3bd5_Internal   e4cd8c21addf        401MB
docker-dhcp-relay             latest                             e4cd8c21addf        401MB
docker-sonic-telemetry        SONIC.master.64-46b3bd5_Internal   cdfcf055317a        469MB
docker-sonic-telemetry        latest                             cdfcf055317a        469MB
docker-teamd                  SONIC.master.64-46b3bd5_Internal   35c2ae9ebd57        405MB
docker-teamd                  latest                             35c2ae9ebd57        405MB
docker-fpm-frr                SONIC.master.64-46b3bd5_Internal   819524ded687        422MB
docker-fpm-frr                latest                             819524ded687        422MB
docker-sflow                  SONIC.master.64-46b3bd5_Internal   f83e8d6069ab        406MB
docker-sflow                  latest                             f83e8d6069ab        406MB

@vadymhlushko-mlnx
Copy link
Contributor Author

show techsupport
sonic_dump_arc-switch1038_20210126_150103.tar.gz

@praveen-li
Copy link
Member

praveen-li commented Jan 26, 2021 via email

@samaity
Copy link
Collaborator

samaity commented Jan 26, 2021

I just checked the code. It is not adding any particular suffix to the alias. We only use the aliases from the platform.json in the logic.

@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Jan 27, 2021 via email

@vadymhlushko-mlnx
Copy link
Contributor Author

@praveen-li, @samaity, @zhenggen-xu

I'm sorry, maybe the previous comment was not clear, let me clarify about the postfix a (e.g etp1a):

Aliases like etp1a, etp2a are taken from the platfrom.json file and goes to the /etc/sonic/config_db.json while the user doing the command config load_minigraph

For example, if we change the "alias_at_lanes" field for every interface (e.g. Ethernet0, Ethernet8) in platform.json file:
from
"alias_at_lanes": "etp1a, etp1b, etp1c, etp1d, etp1e, etp1f, etp1g, etp1h",
to
"alias_at_lanes": "etp1, etp1b, etp1c, etp1d, etp1e, etp1f, etp1g, etp1h",

And then will do the config load_minigraph command - everything will be okay and the switch will have correct /etc/sonic/config_db.json.

@zhenggen-xu
Copy link
Collaborator

@vadymhlushko-mlnx Still not sure what the problem is. Do you want etp1 for Ethernet0 all the time? If so, then configure that way in platform.json. Or do you want the alias to be etp1 for Ethernet0 in case of 100G but etp1a for Ethernet0 in case of breakout? If that is the case, the current DPB does not support that, we have to enhance the design and also implement it.

Again, if you have etp1a in the platform.json, we will always generate etp1a to config_db.json, so not sure where that etp1 came from. If it was from old configurations (generated outside or inherited by upgrade or whatever), then that configuration was not compatible with the current platform.json, and you have to start with a compatible configuration from beginning.

@lguohan
Copy link
Collaborator

lguohan commented Jan 27, 2021

etp1 is for 100G ethernet0
etp1a is for 50G ethernet0 or 25G ethernet0

need to enhance that.

@zhenggen-xu
Copy link
Collaborator

etp1 is for 100G ethernet0
etp1a is for 50G ethernet0 or 25G ethernet0

need to enhance that.

@vadymhlushko-mlnx If this is the case, for simplicity reasons, I would suggest we introduce one more field in platform.json, like "alias_root", which can specify the alias for the root port when we don't breakout (I,E single port) for that port group. e,g, we use etp1 for Ethernet0. and we can incorporate the changes in the parsing logic to use that alias. Changes need to be made in https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-config-engine/portconfig.py

If we even want different aliases for different breakout modes, then it could be more lengthy where we need alias list for each breakout mode.

@vadymhlushko-mlnx
Copy link
Contributor Author

etp1 is for 100G ethernet0
etp1a is for 50G ethernet0 or 25G ethernet0
need to enhance that.

@vadymhlushko-mlnx If this is the case, for simplicity reasons, I would suggest we introduce one more field in platform.json, like "alias_root", which can specify the alias for the root port when we don't breakout (I,E single port) for that port group. e,g, we use etp1 for Ethernet0. and we can incorporate the changes in the parsing logic to use that alias. Changes need to be made in https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-config-engine/portconfig.py

If we even want different aliases for different breakout modes, then it could be more lengthy where we need alias list for each breakout mode.

Additional field the alias_root - sounds great. Thanks!

@zhenggen-xu
Copy link
Collaborator

Additional field the alias_root - sounds great. Thanks!

would you implement this? and we will review it.

@zhenggen-xu zhenggen-xu added the P1 Priority of the issue, lower than P0 label Feb 3, 2021
@zhenggen-xu
Copy link
Collaborator

After the last DPB subgroup meeting with the example config_db.json. It was noted that some of the tables like PORT_CHANNEL table member has invalid name. After checking the code, it turned out to be in the flow from minigraph to configDB translation. Minigraph takes the alias as input, in this case etp1, and trying to translate to PORT_NAME into config_db.json, since platform.json do not have etp1 as alias, the translation failed, thus left the alias in config_db.json and cause backend to fail.

To really support flexible aliases for different vendors and also for different breakout modes, I raised a PR for the design change: sonic-net/SONiC#749 , with this new format, we need change some logic in portconfig.py. @vadymhlushko-mlnx Let me know if you guys wanted to go ahead implement that logic in portconfig.py. Thanks!

@zhenggen-xu
Copy link
Collaborator

@samaity Will work on the changes.

lguohan pushed a commit that referenced this issue 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]>
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this issue 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 issue 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 issue 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
Labels
P1 Priority of the issue, lower than P0 Port Breakout 🔱
Projects
None yet
7 participants