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

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

Merged
merged 5 commits into from
Aug 4, 2023
Merged
Changes from 1 commit
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
4 changes: 1 addition & 3 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1775,9 +1775,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
# 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(',')
# check if the 400g port has only 8 lanes
if len(port_lanes) != 8:
continue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is not the problem, we should keep this.

theoritical speaking, there about 2lane, each lane is 200G, total 400G configuration. in this case, you do not want to select 4 lanes since the port only has 2 lanes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vdahiya12
consider following cases:-

  1. 400G using 8x50G
  2. 400G using 4x100G
  3. 400G using 2x200G (in the future)

A. We should skip in the #3 case because we don't have 4 lanes in port_config.ini to choose from for 100G

B. #2 In this case we don't need to select the lanes for 100G speed because its already 4 lanes

So, the only case which can support 100G NRZ is when 400G is 8*50G so we should skip updating the lanes to first 4 lanes if the number of lanes is not 8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


updated_lanes = ",".join(port_lanes[:4])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it better to update lane map when the number of lanes is 8? Is taking first 4 lanes always right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in both cases when a port has 4 lanes or 8 lanes, if we want to transition from 400G to 100G, we need only first 4 lanes, so we are right in that regard.

ports[port_name]['lanes'] = updated_lanes

Expand Down