Skip to content

Commit 0014ec4

Browse files
vdahiya12pull[bot]
authored andcommitted
[minigraph] remove number of lanes check for changing speed from 400G to 100G and set speed setting before lane reconfiguration (sonic-net#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 <[email protected]>
1 parent 7822476 commit 0014ec4

File tree

4 files changed

+2465
-1
lines changed

4 files changed

+2465
-1
lines changed

src/sonic-config-engine/minigraph.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1778,6 +1778,9 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
17781778
port_default_speed = port_speeds_default.get(port_name, None)
17791779
port_png_speed = port_speed_png[port_name]
17801780

1781+
# set Port Speed before lane update
1782+
ports.setdefault(port_name, {})['speed'] = port_png_speed
1783+
17811784
# when the port speed is changes from 400g to 100g/40g
17821785
# update the port lanes, use the first 4 lanes of the 400G port to support 100G/40G port
17831786
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
17881791
updated_lanes = ",".join(port_lanes[:4])
17891792
ports[port_name]['lanes'] = updated_lanes
17901793

1791-
ports.setdefault(port_name, {})['speed'] = port_speed_png[port_name]
17921794

17931795
for port_name, port in list(ports.items()):
17941796
# get port alias from port_config.ini

0 commit comments

Comments
 (0)