18263c99dd
To fix [DPB| wrong aliases for interfaces](https://github.com/Azure/sonic-buildimage/issues/6024) issue, implimented flexible alias support [design doc](https://github.com/Azure/SONiC/pull/749) > [[dpb|config] Fix the validation logic of breakout mode](https://github.com/Azure/sonic-utilities/pull/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>
149 lines
5.2 KiB
JSON
149 lines
5.2 KiB
JSON
{
|
|
"interfaces": {
|
|
"Ethernet0": {
|
|
"index": "1,1,1,1",
|
|
"lanes": "0,1,2,3",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp1"],
|
|
"2x50G[40G,25G,10G]": ["etp1a", "etp1b"],
|
|
"4x25G[10G]": ["etp1a", "etp1b", "etp1c", "etp1d"]
|
|
}
|
|
},
|
|
"Ethernet4": {
|
|
"index": "2,2,2,2",
|
|
"lanes": "4,5,6,7",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp2"],
|
|
"2x50G[40G,25G,10G]": ["etp2a", "etp2b"],
|
|
"4x25G[10G]": ["etp2a", "etp2b", "etp2c", "etp2d"]
|
|
}
|
|
},
|
|
"Ethernet8": {
|
|
"index": "3,3,3,3",
|
|
"lanes": "8,9,10,11",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp3"],
|
|
"2x50G[40G,25G,10G]": ["etp3a", "etp3b"],
|
|
"4x25G[10G]": ["etp3a", "etp3b", "etp3c", "etp3d"]
|
|
}
|
|
},
|
|
"Ethernet12": {
|
|
"index": "4,4,4,4",
|
|
"lanes": "12,13,14,15",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp4"],
|
|
"2x50G[40G,25G,10G]": ["etp4a", "etp4b"],
|
|
"4x25G[10G]": ["etp4a", "etp4b", "etp4c", "etp4d"]
|
|
}
|
|
},
|
|
"Ethernet16": {
|
|
"index": "5,5,5,5",
|
|
"lanes": "16,17,18,19",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp5"],
|
|
"2x50G[40G,25G,10G]": ["etp5a", "etp5b"],
|
|
"4x25G[10G]": ["etp5a", "etp5b", "etp5c", "etp5d"]
|
|
}
|
|
},
|
|
"Ethernet20": {
|
|
"index": "6,6,6,6",
|
|
"lanes": "20,21,22,23",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp6"],
|
|
"2x50G[40G,25G,10G]": ["etp6a", "etp6b"],
|
|
"4x25G[10G]": ["etp6a", "etp6b", "etp6c", "etp6d"]
|
|
}
|
|
},
|
|
"Ethernet24": {
|
|
"index": "7,7,7,7",
|
|
"lanes": "24,25,26,27",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp7"],
|
|
"2x50G[40G,25G,10G]": ["etp7a", "etp7b"],
|
|
"4x25G[10G]": ["etp7a", "etp7b", "etp7c", "etp7d"]
|
|
}
|
|
},
|
|
"Ethernet28": {
|
|
"index": "8,8,8,8",
|
|
"lanes": "28,29,30,31",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp8"],
|
|
"2x50G[40G,25G,10G]": ["etp8a", "etp8b"],
|
|
"4x25G[10G]": ["etp8a", "etp8b", "etp8c", "etp8d"]
|
|
}
|
|
},
|
|
"Ethernet32": {
|
|
"index": "9,9,9,9",
|
|
"lanes": "32,33,34,35",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp9"],
|
|
"2x50G[40G,25G,10G]": ["etp9a", "etp9b"],
|
|
"4x25G[10G]": ["etp9a", "etp9b", "etp9c", "etp9d"]
|
|
}
|
|
},
|
|
"Ethernet36": {
|
|
"index": "10,10,10,10",
|
|
"lanes": "36,37,38,39",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp10"],
|
|
"2x50G[40G,25G,10G]": ["etp10a", "etp10b"],
|
|
"4x25G[10G]": ["etp10a", "etp10b", "etp10c", "etp10d"]
|
|
}
|
|
},
|
|
"Ethernet40": {
|
|
"index": "11,11,11,11",
|
|
"lanes": "40,41,42,43",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp11"],
|
|
"2x50G[40G,25G,10G]": ["etp11a", "etp11b"],
|
|
"4x25G[10G]": ["etp11a", "etp11b", "etp11c", "etp11d"]
|
|
}
|
|
},
|
|
"Ethernet44": {
|
|
"index": "12,12,12,12",
|
|
"lanes": "44,45,46,47",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp12"],
|
|
"2x50G[40G,25G,10G]": ["etp12a", "etp12b"],
|
|
"4x25G[10G]": ["etp12a", "etp12b", "etp12c", "etp12d"]
|
|
}
|
|
},
|
|
"Ethernet48": {
|
|
"index": "13,13,13,13",
|
|
"lanes": "48,49,50,51",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp13"],
|
|
"2x50G[40G,25G,10G]": ["etp13a", "etp13b"],
|
|
"4x25G[10G]": ["etp13a", "etp13b", "etp13c", "etp13d"]
|
|
}
|
|
},
|
|
"Ethernet52": {
|
|
"index": "14,14,14,14",
|
|
"lanes": "52,53,54,55",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp14"],
|
|
"2x50G[40G,25G,10G]": ["etp14a", "etp14b"],
|
|
"4x25G[10G]": ["etp14a", "etp14b", "etp14c", "etp14d"]
|
|
}
|
|
},
|
|
"Ethernet56": {
|
|
"index": "15,15,15,15",
|
|
"lanes": "56,57,58,59",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp15"],
|
|
"2x50G[40G,25G,10G]": ["etp15a", "etp15b"],
|
|
"4x25G[10G]": ["etp15a", "etp15b", "etp15c", "etp15d"]
|
|
}
|
|
},
|
|
"Ethernet60": {
|
|
"index": "16,16,16,16",
|
|
"lanes": "60,61,62,63",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G]": ["etp16"],
|
|
"2x50G[40G,25G,10G]": ["etp16a", "etp16b"],
|
|
"4x25G[10G]": ["etp16a", "etp16b", "etp16c", "etp16d"]
|
|
}
|
|
}
|
|
}
|
|
}
|