[minigraph] remove number of lanes check for changing speed from 400G to 100G and set speed setting before lane reconfiguration (#15721)

8111 800G interface, split to 2x400G (each has 4 lanes) fails to change interface speed from 400G to 100G during deploy mg. In minigraph.xml, the interface speed configuration is good, but fails to generate the right value to config_db.json.

In order to support this SKU the speed transitioning should support both 4 lanes and 8 lanes in the port_config.ini.

Why I did it

before this change for a 400G to 100G transition, in all cases except when lanes are 8, we would continue and the line
ports.setdefault(port_name, {})['speed'] = port_speed_png[port_name]
would not be executed, hence the default speed will never be set for a case and config_db will not be updated,
where speed is transitioning from 400G to 100G or 40G, but lanes are not equal to 8.

In order for those cases to pass where lanes are not specifically 8, we need the change

Work item tracking
24242657

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This commit is contained in:
vdahiya12 2023-08-04 14:53:49 -07:00 committed by GitHub
parent 97a091abd2
commit f41aad9226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2465 additions and 1 deletions

View File

@ -1778,6 +1778,9 @@ 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]
# set Port Speed before lane update
ports.setdefault(port_name, {})['speed'] = port_png_speed
# when the port speed is changes from 400g to 100g/40g
# update the port lanes, use the first 4 lanes of the 400G port to support 100G/40G port
if port_default_speed == '400000' and (port_png_speed == '100000' or port_png_speed == '40000'):
@ -1788,7 +1791,6 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
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()):
# get port alias from port_config.ini

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 etp12 12 400000
Ethernet104 1800,1801,1802,1803 etp13 13 400000
Ethernet112 1552,1553,1554,1555 etp14 14 400000
Ethernet120 1544,1545,1546,1547 etp15 15 400000
Ethernet128 1296,1297,1298,1299 etp16 16 400000
Ethernet136 1288,1289,1290,1291 etp17 17 400000
Ethernet144 1280,1281,1282,1283 etp18 18 400000
Ethernet152 1032,1033,1034,1035 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