Skip to content

Commit

Permalink
[minigraph] remove number of lanes check for changing speed from 400G…
Browse files Browse the repository at this point in the history
… to 100G and set speed setting before lane reconfiguration (#15721) (#16054)
  • Loading branch information
mssonicbld committed Aug 6, 2023
1 parent 14ba74e commit b812e56
Show file tree
Hide file tree
Showing 4 changed files with 2,465 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,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'):
Expand All @@ -1776,7 +1779,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
Expand Down
Loading

0 comments on commit b812e56

Please sign in to comment.