Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code sync] Merge code from sonic-net/sonic-buildimage:202205 to 202205 #103

Merged
merged 3 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,10 @@ 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]

# when the port speed is changes from 400g to 100g/40g
# 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'):
port_lanes = ports[port_name].get('lanes', '').split(',')
Expand All @@ -1747,7 +1750,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