@@ -1023,8 +1023,8 @@ def on_port_update_event(self, port_change_event):
1023
1023
self .port_dict [lport ]['laser_freq' ] = int (port_change_event .port_dict ['laser_freq' ])
1024
1024
if 'tx_power' in port_change_event .port_dict :
1025
1025
self .port_dict [lport ]['tx_power' ] = float (port_change_event .port_dict ['tx_power' ])
1026
- if 'channel ' in port_change_event .port_dict :
1027
- self .port_dict [lport ]['channel ' ] = int (port_change_event .port_dict ['channel ' ])
1026
+ if 'subport ' in port_change_event .port_dict :
1027
+ self .port_dict [lport ]['subport ' ] = int (port_change_event .port_dict ['subport ' ])
1028
1028
1029
1029
self .force_cmis_reinit (lport , 0 )
1030
1030
else :
@@ -1097,9 +1097,9 @@ def get_cmis_dp_init_duration_secs(self, api):
1097
1097
def get_cmis_dp_deinit_duration_secs (self , api ):
1098
1098
return api .get_datapath_deinit_duration ()/ 1000
1099
1099
1100
- def get_cmis_host_lanes_mask (self , api , appl , host_lane_count , channel ):
1100
+ def get_cmis_host_lanes_mask (self , api , appl , host_lane_count , subport ):
1101
1101
"""
1102
- Retrieves mask of active host lanes based on appl, host lane count and channel
1102
+ Retrieves mask of active host lanes based on appl, host lane count and subport
1103
1103
1104
1104
Args:
1105
1105
api:
@@ -1108,8 +1108,8 @@ def get_cmis_host_lanes_mask(self, api, appl, host_lane_count, channel):
1108
1108
Integer, the transceiver-specific application code
1109
1109
host_lane_count:
1110
1110
Integer, number of lanes on the host side
1111
- channel :
1112
- Integer, channel id of the group which the host lanes belong to (1 based),
1111
+ subport :
1112
+ Integer, subport id of the group which the host lanes belong to (1 based),
1113
1113
0 means port is a non-breakout port
1114
1114
1115
1115
Returns:
@@ -1118,20 +1118,20 @@ def get_cmis_host_lanes_mask(self, api, appl, host_lane_count, channel):
1118
1118
"""
1119
1119
host_lanes_mask = 0
1120
1120
1121
- if appl < 1 or host_lane_count <= 0 or channel < 0 :
1121
+ if appl < 1 or host_lane_count <= 0 or subport < 0 :
1122
1122
self .log_error ("Invalid input to get host lane mask - appl {} host_lane_count {} "
1123
- "channel {}!" .format (appl , host_lane_count , channel ))
1123
+ "subport {}!" .format (appl , host_lane_count , subport ))
1124
1124
return host_lanes_mask
1125
1125
1126
1126
host_lane_assignment_option = api .get_host_lane_assignment_option (appl )
1127
- host_lane_start_bit = (host_lane_count * (0 if channel == 0 else channel - 1 ))
1127
+ host_lane_start_bit = (host_lane_count * (0 if subport == 0 else subport - 1 ))
1128
1128
if host_lane_assignment_option & (1 << host_lane_start_bit ):
1129
1129
host_lanes_mask = ((1 << host_lane_count ) - 1 ) << host_lane_start_bit
1130
1130
else :
1131
1131
self .log_error ("Unable to find starting host lane - host_lane_assignment_option {}"
1132
- " host_lane_start_bit {} host_lane_count {} channel {} appl {}!" .format (
1132
+ " host_lane_start_bit {} host_lane_count {} subport {} appl {}!" .format (
1133
1133
host_lane_assignment_option , host_lane_start_bit , host_lane_count ,
1134
- channel , appl ))
1134
+ subport , appl ))
1135
1135
1136
1136
return host_lanes_mask
1137
1137
@@ -1360,7 +1360,7 @@ def configure_laser_frequency(self, api, lport, freq, grid=75):
1360
1360
if chan % 3 != 0 :
1361
1361
self .log_error ("{} configured freq:{} GHz is NOT in 75GHz grid" .format (lport , freq ))
1362
1362
if api .get_tuning_in_progress ():
1363
- self .log_error ("{} Tuning in progress, channel selection may fail!" .format (lport ))
1363
+ self .log_error ("{} Tuning in progress, subport selection may fail!" .format (lport ))
1364
1364
return api .set_laser_freq (freq , grid )
1365
1365
1366
1366
def wait_for_port_config_done (self , namespace ):
@@ -1429,8 +1429,8 @@ def task_worker(self):
1429
1429
pport = int (info .get ('index' , "-1" ))
1430
1430
speed = int (info .get ('speed' , "0" ))
1431
1431
lanes = info .get ('lanes' , "" ).strip ()
1432
- channel = info .get ('channel ' , 0 )
1433
- if pport < 0 or speed == 0 or len (lanes ) < 1 or channel < 0 :
1432
+ subport = info .get ('subport ' , 0 )
1433
+ if pport < 0 or speed == 0 or len (lanes ) < 1 or subport < 0 :
1434
1434
continue
1435
1435
1436
1436
# Desired port speed on the host side
@@ -1511,10 +1511,10 @@ def task_worker(self):
1511
1511
self .log_notice ("{}: Setting appl={}" .format (lport , appl ))
1512
1512
1513
1513
self .port_dict [lport ]['host_lanes_mask' ] = self .get_cmis_host_lanes_mask (api ,
1514
- appl , host_lane_count , channel )
1514
+ appl , host_lane_count , subport )
1515
1515
if self .port_dict [lport ]['host_lanes_mask' ] <= 0 :
1516
- self .log_error ("{}: Invalid lane mask received - host_lane_count {} channel {} "
1517
- "appl {}!" .format (lport , host_lane_count , channel , appl ))
1516
+ self .log_error ("{}: Invalid lane mask received - host_lane_count {} subport {} "
1517
+ "appl {}!" .format (lport , host_lane_count , subport , appl ))
1518
1518
self .port_dict [lport ]['cmis_state' ] = self .CMIS_STATE_FAILED
1519
1519
continue
1520
1520
host_lanes_mask = self .port_dict [lport ]['host_lanes_mask' ]
0 commit comments