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>
293 lines
11 KiB
JSON
293 lines
11 KiB
JSON
{
|
|
"interfaces": {
|
|
"Ethernet0": {
|
|
"index": "1,1,1,1",
|
|
"lanes": "0,1,2,3",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp1"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp1a", "etp1b"],
|
|
"4x25G[10G,1G]": ["etp1a", "etp1b", "etp1c", "etp1d"]
|
|
}
|
|
},
|
|
"Ethernet8": {
|
|
"index": "2,2,2,2",
|
|
"lanes": "8,9,10,11",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp2"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp2a", "etp2b"],
|
|
"4x25G[10G,1G]": ["etp2a", "etp2b", "etp2c", "etp2d"]
|
|
}
|
|
},
|
|
"Ethernet16": {
|
|
"index": "3,3,3,3",
|
|
"lanes": "16,17,18,19",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp3"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp3a", "etp3b"],
|
|
"4x25G[10G,1G]": ["etp3a", "etp3b", "etp3c", "etp3d"]
|
|
}
|
|
},
|
|
"Ethernet24": {
|
|
"index": "4,4,4,4",
|
|
"lanes": "24,25,26,27",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp4"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp4a", "etp4b"],
|
|
"4x25G[10G,1G]": ["etp4a", "etp4b", "etp4c", "etp4d"]
|
|
}
|
|
},
|
|
"Ethernet32": {
|
|
"index": "5,5,5,5",
|
|
"lanes": "32,33,34,35",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp5"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp5a", "etp5b"],
|
|
"4x25G[10G,1G]": ["etp5a", "etp5b", "etp5c", "etp5d"]
|
|
}
|
|
},
|
|
"Ethernet40": {
|
|
"index": "6,6,6,6",
|
|
"lanes": "40,41,42,43",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp6"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp6a", "etp6b"],
|
|
"4x25G[10G,1G]": ["etp6a", "etp6b", "etp6c", "etp6d"]
|
|
}
|
|
},
|
|
"Ethernet48": {
|
|
"index": "7,7,7,7",
|
|
"lanes": "48,49,50,51",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp7"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp7a", "etp7b"],
|
|
"4x25G[10G,1G]": ["etp7a", "etp7b", "etp7c", "etp7d"]
|
|
}
|
|
},
|
|
"Ethernet56": {
|
|
"index": "8,8,8,8",
|
|
"lanes": "56,57,58,59",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp8"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp8a", "etp8b"],
|
|
"4x25G[10G,1G]": ["etp8a", "etp8b", "etp8c", "etp8d"]
|
|
}
|
|
},
|
|
"Ethernet64": {
|
|
"index": "9,9,9,9",
|
|
"lanes": "64,65,66,67",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp9"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp9a", "etp9b"],
|
|
"4x25G[10G,1G]": ["etp9a", "etp9b", "etp9c", "etp9d"]
|
|
}
|
|
},
|
|
"Ethernet72": {
|
|
"index": "10,10,10,10",
|
|
"lanes": "72,73,74,75",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp10"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp10a", "etp10b"],
|
|
"4x25G[10G,1G]": ["etp10a", "etp10b", "etp10c", "etp10d"]
|
|
}
|
|
},
|
|
"Ethernet80": {
|
|
"index": "11,11,11,11",
|
|
"lanes": "80,81,82,83",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp11"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp11a", "etp11b"],
|
|
"4x25G[10G,1G]": ["etp11a", "etp11b", "etp11c", "etp11d"]
|
|
}
|
|
},
|
|
"Ethernet88": {
|
|
"index": "12,12,12,12",
|
|
"lanes": "88,89,90,91",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp12"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp12a", "etp12b"],
|
|
"4x25G[10G,1G]": ["etp12a", "etp12b", "etp12c", "etp12d"]
|
|
}
|
|
},
|
|
"Ethernet96": {
|
|
"index": "13,13,13,13",
|
|
"lanes": "96,97,98,99",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp13"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp13a", "etp13b"],
|
|
"4x25G[10G,1G]": ["etp13a", "etp13b", "etp13c", "etp13d"]
|
|
}
|
|
},
|
|
"Ethernet104": {
|
|
"index": "14,14,14,14",
|
|
"lanes": "104,105,106,107",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp14"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp14a", "etp14b"],
|
|
"4x25G[10G,1G]": ["etp14a", "etp14b", "etp14c", "etp14d"]
|
|
}
|
|
},
|
|
"Ethernet112": {
|
|
"index": "15,15,15,15",
|
|
"lanes": "112,113,114,115",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp15"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp15a", "etp15b"],
|
|
"4x25G[10G,1G]": ["etp15a", "etp15b", "etp15c", "etp15d"]
|
|
}
|
|
},
|
|
"Ethernet120": {
|
|
"index": "16,16,16,16",
|
|
"lanes": "120,121,122,123",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp16"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp16a", "etp16b"],
|
|
"4x25G[10G,1G]": ["etp16a", "etp16b", "etp16c", "etp16d"]
|
|
}
|
|
},
|
|
"Ethernet128": {
|
|
"index": "17,17,17,17",
|
|
"lanes": "128,129,130,131",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp17"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp17a", "etp17b"],
|
|
"4x25G[10G,1G]": ["etp17a", "etp17b", "etp17c", "etp17d"]
|
|
}
|
|
},
|
|
"Ethernet136": {
|
|
"index": "18,18,18,18",
|
|
"lanes": "136,137,138,139",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp18"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp18a", "etp18b"],
|
|
"4x25G[10G,1G]": ["etp18a", "etp18b", "etp18c", "etp18d"]
|
|
}
|
|
},
|
|
"Ethernet144": {
|
|
"index": "19,19,19,19",
|
|
"lanes": "144,145,146,147",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp19"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp19a", "etp19b"],
|
|
"4x25G[10G,1G]": ["etp19a", "etp19b", "etp19c", "etp19d"]
|
|
}
|
|
},
|
|
"Ethernet152": {
|
|
"index": "20,20,20,20",
|
|
"lanes": "152,153,154,155",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp20"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp20a", "etp20b"],
|
|
"4x25G[10G,1G]": ["etp20a", "etp20b", "etp20c", "etp20d"]
|
|
}
|
|
},
|
|
"Ethernet160": {
|
|
"index": "21,21,21,21",
|
|
"lanes": "160,161,162,163",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp21"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp21a", "etp21b"],
|
|
"4x25G[10G,1G]": ["etp21a", "etp21b", "etp21c", "etp21d"]
|
|
}
|
|
},
|
|
"Ethernet168": {
|
|
"index": "22,22,22,22",
|
|
"lanes": "168,169,170,171",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp22"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp22a", "etp22b"],
|
|
"4x25G[10G,1G]": ["etp22a", "etp22b", "etp22c", "etp22d"]
|
|
}
|
|
},
|
|
"Ethernet176": {
|
|
"index": "23,23,23,23",
|
|
"lanes": "176,177,178,179",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp23"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp23a", "etp23b"],
|
|
"4x25G[10G,1G]": ["etp23a", "etp23b", "etp23c", "etp23d"]
|
|
}
|
|
},
|
|
"Ethernet184": {
|
|
"index": "24,24,24,24",
|
|
"lanes": "184,185,186,187",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp24"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp24a", "etp24b"],
|
|
"4x25G[10G,1G]": ["etp24a", "etp24b", "etp24c", "etp24d"]
|
|
}
|
|
},
|
|
"Ethernet192": {
|
|
"index": "25,25,25,25,25,25,25,25",
|
|
"lanes": "192,193,194,195,196,197,198,199",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp25"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp25a", "etp25b"],
|
|
"4x25G[10G,1G]": ["etp25a", "etp25b", "etp25c", "etp25d"]
|
|
}
|
|
},
|
|
"Ethernet200": {
|
|
"index": "26,26,26,26,26,26,26,26",
|
|
"lanes": "200,201,202,203,204,205,206,207",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp26"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp26a", "etp26b"],
|
|
"4x25G[10G,1G]": ["etp26a", "etp26b", "etp26c", "etp26d"]
|
|
}
|
|
},
|
|
"Ethernet208": {
|
|
"index": "27,27,27,27,27,27,27,27",
|
|
"lanes": "208,209,210,211,212,213,214,215",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp27"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp27a", "etp27b"],
|
|
"4x25G[10G,1G]": ["etp27a", "etp27b", "etp27c", "etp27d"]
|
|
}
|
|
},
|
|
"Ethernet216": {
|
|
"index": "28,28,28,28,28,28,28,28",
|
|
"lanes": "216,217,218,219,220,221,222,223",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp28"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp28a", "etp28b"],
|
|
"4x25G[10G,1G]": ["etp28a", "etp28b", "etp28c", "etp28d"]
|
|
}
|
|
},
|
|
"Ethernet224": {
|
|
"index": "29,29,29,29,29,29,29,29",
|
|
"lanes": "224,225,226,227,228,229,230,231",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp29"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp29a", "etp29b"],
|
|
"4x25G[10G,1G]": ["etp29a", "etp29b", "etp29c", "etp29d"]
|
|
}
|
|
},
|
|
"Ethernet232": {
|
|
"index": "30,30,30,30,30,30,30,30",
|
|
"lanes": "232,233,234,235,236,237,238,239",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp30"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp30a", "etp30b"],
|
|
"4x25G[10G,1G]": ["etp30a", "etp30b", "etp30c", "etp30d"]
|
|
}
|
|
},
|
|
"Ethernet240": {
|
|
"index": "31,31,31,31,31,31,31,31",
|
|
"lanes": "240,241,242,243,244,245,246,247",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp31"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp31a", "etp31b"],
|
|
"4x25G[10G,1G]": ["etp31a", "etp31b", "etp31c", "etp31d"]
|
|
}
|
|
},
|
|
"Ethernet248": {
|
|
"index": "32,32,32,32,32,32,32,32",
|
|
"lanes": "248,249,250,251,252,253,254,255",
|
|
"breakout_modes": {
|
|
"1x100G[50G,40G,25G,10G,1G]": ["etp32"],
|
|
"2x50G[40G,25G,10G,1G]": ["etp32a", "etp32b"],
|
|
"4x25G[10G,1G]": ["etp32a", "etp32b", "etp32c", "etp32d"]
|
|
}
|
|
}
|
|
}
|
|
}
|