-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
100G Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@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? |
# check if the 400g port has only 8 lanes | ||
if len(port_lanes) != 8: | ||
continue | ||
|
||
updated_lanes = ",".join(port_lanes[:4]) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@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 please update the description according to the latest PR changes |
src/sonic-config-engine/minigraph.py
Outdated
@@ -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] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/sonic-config-engine/minigraph.py
Outdated
# 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vdahiya12
consider following cases:-
- 400G using 8x50G
- 400G using 4x100G
- 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
There was a problem hiding this comment.
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>
… 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>
Cherry-pick PR to 202305: #16054 |
@vdahiya12 PR conflicts with 202205 branch |
@vdahiya12 PR conflicts with 202211 branch |
… 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>
… 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>
… 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>
… 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>
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
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
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)