- Why I did it There are chassis-packet and Single asic platforms which support this 400G to 100G/40G speed change via config. Enabling this feature for all platforms which can support this. Keeping it enabled for all does not affect the platforms which do not support this feature yet. Work item tracking Microsoft ADO (number only): 17952356 - How I did it Removed switch_type and role type check. - How to verify it Loaded router with default 400G config. Loaded minigraph to convert 400G to 100G speed. Signed-off-by: anamehra <anamehra@cisco.com>
This commit is contained in:
parent
b6df524b0f
commit
14ecd2811d
@ -1706,17 +1706,15 @@ 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]
|
||||
|
||||
# Add a check for for voq, T1
|
||||
if results['DEVICE_METADATA']['localhost']['type'].lower() == 'leafrouter' or switch_type == 'voq':
|
||||
# when the port speed is changes from 400g to 100g
|
||||
# update the port lanes, use the first 4 lanes of the 400G port to support 100G port
|
||||
if port_default_speed == '400000' and port_png_speed == '100000':
|
||||
port_lanes = ports[port_name].get('lanes', '').split(',')
|
||||
# check if the 400g port has only 8 lanes
|
||||
if len(port_lanes) != 8:
|
||||
continue
|
||||
updated_lanes = ",".join(port_lanes[:4])
|
||||
ports[port_name]['lanes'] = updated_lanes
|
||||
# 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
|
||||
updated_lanes = ",".join(port_lanes[:4])
|
||||
ports[port_name]['lanes'] = updated_lanes
|
||||
|
||||
ports.setdefault(port_name, {})['speed'] = port_speed_png[port_name]
|
||||
|
||||
|
Reference in New Issue
Block a user