[minigraph] add support for changing T1 ports speed from 400G to 100G and vice-versa (#14505) (#14977)

* [minigraph] add support for changing T1 ports speed from 400G to 100G and vice-versa (#14505)

 Open
[minigraph] add support for changing T1 ports speed from 400G to 100G and vice-versa
vdahiya12 wants to merge 9 commits into sonic-net:master from vdahiya12:dev/vdahiya/minigraph_parser
Conversation 10
Commits 9
Checks 18
Files changed 5
Conversation
vdahiya12
@vdahiya12 vdahiya12 commented 2 weeks ago •
On SONiC T1 cisco 8101 HwSku, the speed changes are done from 400G to 100G needs to be supported on 400G ports.
To enable this, along with speed change the port lanes need to be changed. This PR has the changes to update the port lanes when such speed change happens.
Basically if Banwidth in minigraph.xml intends to enable a 100G speed on a 400G port, then the appropriate lane change and speed change needs to be invoked in mingraph parser
Example if port_config.ini dicatates the speed to be 400G and minigraph has 100G speed, then this changeneeds to be accommodated

Ethernet96     1536,1537,1538,1539,1540,1541,1542,1543    etp12    12       400000     0
 <DeviceLinkBase>
        <ElementType>DeviceInterfaceLink</ElementType>
        <EndDevice>ARISTA01T2</EndDevice>
        <EndPort>Ethernet1</EndPort>
        <StartDevice>Device-8101-01</StartDevice>
        <StartPort>etp12</StartPort>
        <Bandwidth>100000</Bandwidth>
      </DeviceLinkBase>
These platforms today have 400g port with 8 serdes lines, and 100g will operate with 4 serdes lane. When the port speed changes from 400G to 100G the first 4 lanes will be used for 100G port.

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>

* add all

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>

* fix unit

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>

---------

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This commit is contained in:
vdahiya12 2023-05-09 15:07:21 -07:00 committed by GitHub
parent b8d44e6fb8
commit 3ef3593132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4864 additions and 3 deletions

View File

@ -1656,7 +1656,8 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
port_default_speed = port_speeds_default.get(port_name, None)
port_png_speed = port_speed_png[port_name]
if switch_type == 'voq':
# Add a check for for voq, T1
if results['DEVICE_METADATA']['localhost']['type'].lower() == 'leafrouter' or switch_type == 'voq':
# when the port speed is changes from 400g to 100g
# update the port lanes, use the first 4 lanes of the 400G port to support 100G port
if port_default_speed == '400000' and port_png_speed == '100000':
@ -1666,7 +1667,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
continue
updated_lanes = ",".join(port_lanes[:4])
ports[port_name]['lanes'] = updated_lanes
ports.setdefault(port_name, {})['speed'] = port_speed_png[port_name]
for port_name, port in list(ports.items()):

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
# name lanes alias index speed
Ethernet0 2304,2305,2306,2307 etp0a 0 100000
Ethernet4 2308,2309,2310,2311 etp0b 0 100000
Ethernet8 2320,2321,2322,2323 etp1a 1 100000
Ethernet12 2324,2325,2326,2327 etp1b 1 100000
Ethernet16 2312,2313,2314,2315 etp2a 2 100000
Ethernet20 2316,2317,2318,2319 etp2b 2 100000
Ethernet24 2056,2057,2058,2059 etp3a 3 100000
Ethernet28 2060,2061,2062,2063 etp3b 3 100000
Ethernet32 1792,1793,1794,1795 etp4a 4 100000
Ethernet36 1796,1797,1798,1799 etp4b 4 100000
Ethernet40 2048,2049,2050,2051 etp5a 5 100000
Ethernet44 2052,2053,2054,2055 etp5b 5 100000
Ethernet48 2560,2561,2562,2563 etp6a 6 100000
Ethernet52 2564,2565,2566,2567 etp6b 6 100000
Ethernet56 2824,2825,2826,2827 etp7a 7 100000
Ethernet60 2828,2829,2830,2831 etp7b 7 100000
Ethernet64 2832,2833,2834,2835 etp8a 8 100000
Ethernet68 2836,2837,2838,2839 etp8b 8 100000
Ethernet72 2816,2817,2818,2819 etp9a 9 100000
Ethernet76 2820,2821,2822,2823 etp9b 9 100000
Ethernet80 2568,2569,2570,2571 etp10a 10 100000
Ethernet84 2572,2573,2574,2575 etp10b 10 100000
Ethernet88 2576,2577,2578,2579 etp11a 11 100000
Ethernet92 2580,2581,2582,2583 etp11b 11 100000
Ethernet96 1536,1537,1538,1539,1540,1541,1542,1543 etp12 12 400000
Ethernet104 1800,1801,1802,1803,1804,1805,1806,1807 etp13 13 400000
Ethernet112 1552,1553,1554,1555,1556,1557,1558,1559 etp14 14 400000
Ethernet120 1544,1545,1546,1547,1548,1549,1550,1551 etp15 15 400000
Ethernet128 1296,1297,1298,1299,1300,1301,1302,1303 etp16 16 400000
Ethernet136 1288,1289,1290,1291,1292,1293,1294,1295 etp17 17 400000
Ethernet144 1280,1281,1282,1283,1284,1285,1286,1287 etp18 18 400000
Ethernet152 1032,1033,1034,1035,1036,1037,1038,1039 etp19 19 400000
Ethernet160 264,265,266,267 etp20a 20 100000
Ethernet164 268,269,270,271 etp20b 20 100000
Ethernet168 272,273,274,275 etp21a 21 100000
Ethernet172 276,277,278,279 etp21b 21 100000
Ethernet176 16,17,18,19 etp22a 22 100000
Ethernet180 20,21,22,23 etp22b 22 100000
Ethernet184 0,1,2,3 etp23a 23 100000
Ethernet188 4,5,6,7 etp23b 23 100000
Ethernet192 256,257,258,259 etp24a 24 100000
Ethernet196 260,261,262,263 etp24b 24 100000
Ethernet200 8,9,10,11 etp25a 25 100000
Ethernet204 12,13,14,15 etp25b 25 100000
Ethernet208 1024,1025,1026,1027 etp26a 26 100000
Ethernet212 1028,1029,1030,1031 etp26b 26 100000
Ethernet216 768,769,770,771 etp27a 27 100000
Ethernet220 772,773,774,775 etp27b 27 100000
Ethernet224 524,525,526,527 etp28a 28 100000
Ethernet228 520,521,522,523 etp28b 28 100000
Ethernet232 776,777,778,779 etp29a 29 100000
Ethernet236 780,781,782,783 etp29b 29 100000
Ethernet240 516,517,518,519 etp30a 30 100000
Ethernet244 512,513,514,515 etp30b 30 100000
Ethernet248 528,529,530,531 etp31a 31 100000
Ethernet252 532,533,534,535 etp31b 31 100000

File diff suppressed because one or more lines are too long