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

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Jul 5, 2023

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

  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

100G

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 requested a review from prgeor July 5, 2023 20:17
abdosi
abdosi previously approved these changes Jul 5, 2023
@prgeor
Copy link
Contributor

prgeor commented Jul 5, 2023

@vdahiya12 can you specify in "Why I did it" that 400G interface could be realized with 100G (x 4) PAM4 or 50G (x8)PAM4 and hence the check for 8 lanes will not work for platforms using 100G PAM4?

@prgeor
Copy link
Contributor

prgeor commented Jul 6, 2023

@lguohan @yxieca please help merge

# check if the 400g port has only 8 lanes
if len(port_lanes) != 8:
continue

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.

@lguohan
Copy link
Collaborator

lguohan commented Jul 7, 2023

@prgeor , i am not sure i understand the problem. in 8111, 2x400g mode, each 400G port only has 4 lanes, why this 8 lanes check poses issue?

@vdahiya12
Copy link
Contributor Author

@prgeor , i am not sure i understand the problem. in 8111, 2x400g mode, each 400G port only has 4 lanes, why this 8 lanes check poses issue?

For this Cisco-8111-O64, the minigraph parser fails as we only consider ports with 8 lanes for the 400G to 100G transition, but since we can go from 400G to 100G on a 4 lanes port as well, we need to disable this check.

@lguohan
Copy link
Collaborator

lguohan commented Jul 7, 2023

@prgeor , i am not sure i understand the problem. in 8111, 2x400g mode, each 400G port only has 4 lanes, why this 8 lanes check poses issue?

For this Cisco-8111-O64, the minigraph parser fails as we only consider ports with 8 lanes for the 400G to 100G transition, but since we can go from 400G to 100G on a 4 lanes port as well, we need to disable this check.

if the lane is already 4, then there is no need to do updated_lanes. I still do not understand the code logic here.

@vdahiya12 vdahiya12 marked this pull request as draft July 7, 2023 17:55
@prgeor
Copy link
Contributor

prgeor commented Jul 7, 2023

@prgeor , i am not sure i understand the problem. in 8111, 2x400g mode, each 400G port only has 4 lanes, why this 8 lanes check poses issue?

For this Cisco-8111-O64, the minigraph parser fails as we only consider ports with 8 lanes for the 400G to 100G transition, but since we can go from 400G to 100G on a 4 lanes port as well, we need to disable this check.

if the lane is already 4, then there is no need to do updated_lanes. I still do not understand the code logic here.

@lguohan agree. minigraph parser should get the 4 lanes from the port_config.ini. Checking with Kevin Wang what was the issue Wang

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 marked this pull request as ready for review July 21, 2023 00:32
@prgeor
Copy link
Contributor

prgeor commented Jul 26, 2023

@vdahiya12 please update the description according to the latest PR changes

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12
Copy link
Contributor Author

@lguohan @yxieca please help merge

@vdahiya12 vdahiya12 changed the title [minigraph] remove number of lanes check for changing speed from 400G to 100G [minigraph] remove number of lanes check for changing speed from 400G to 100G and set speed setting before lane reconfiguration Aug 1, 2023
@@ -1771,17 +1771,16 @@ 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]

ports.setdefault(port_name, {})['speed'] = port_speed_png[port_name]
Copy link
Collaborator

Choose a reason for hiding this comment

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

given 1772 set the port_png_speed, it is better to use it here as well.

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

# 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(',')
# 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

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lguohan lguohan merged commit f41aad9 into sonic-net:master Aug 4, 2023
16 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Aug 6, 2023
… 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 <vdahiya@microsoft.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #16054

@mssonicbld
Copy link
Collaborator

@vdahiya12 PR conflicts with 202205 branch

@yxieca yxieca added Request for 202111 Branch For PRs being requested for 202111 branch Approved for 202211 Branch and removed Cherry Pick Conflict_202205 Request for 202111 Branch For PRs being requested for 202111 branch labels Aug 29, 2023
@mssonicbld
Copy link
Collaborator

@vdahiya12 PR conflicts with 202211 branch

vdahiya12 added a commit to vdahiya12/sonic-buildimage that referenced this pull request Sep 5, 2023
… 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 <vdahiya@microsoft.com>
vdahiya12 added a commit to vdahiya12/sonic-buildimage that referenced this pull request Sep 5, 2023
… 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 <vdahiya@microsoft.com>
yxieca pushed a commit that referenced this pull request Sep 7, 2023
… to 100G and set speed setting before lane reconfiguration (#16452)

* [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>

* fix UT

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>

---------

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
… 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 <vdahiya@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants