@@ -747,6 +747,7 @@ typedef struct osm_subn {
uint8_t min_ca_mtu;
uint8_t min_ca_rate;
uint8_t min_data_vls;
+ uint8_t min_sw_data_vls;
boolean_t ignore_existing_lfts;
boolean_t subnet_initialization_error;
boolean_t force_heavy_sweep;
@@ -193,6 +193,7 @@ static void pi_rcv_process_switch_port(IN osm_sm_t * sm, IN osm_node_t * p_node,
osm_madw_context_t context;
osm_physp_t *p_remote_physp;
osm_node_t *p_remote_node;
+ unsigned data_vls;
uint8_t port_num;
uint8_t remote_port_num;
osm_dr_path_t path;
@@ -321,6 +322,18 @@ static void pi_rcv_process_switch_port(IN osm_sm_t * sm, IN osm_node_t * p_node,
/* PortState is not used on BSP0 but just in case it is DOWN */
p_physp->port_info = *p_pi;
pi_rcv_process_endport(sm, p_physp, p_pi);
+ } else {
+ data_vls = 1U << (ib_port_info_get_op_vls(p_pi) - 1);
+ if (data_vls >= IB_MAX_NUM_VLS)
+ data_vls = IB_MAX_NUM_VLS - 1;
+ if ((uint8_t)data_vls < sm->p_subn->min_sw_data_vls) {
+ OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+ "Setting switch port minimal data VLs to:%u defined by node:0x%"
+ PRIx64 ", port:%u\n", data_vls,
+ cl_ntoh64(osm_node_get_node_guid(p_node)),
+ port_num);
+ sm->p_subn->min_sw_data_vls = data_vls;
+ }
}
OSM_LOG_EXIT(sm->p_log);
@@ -1209,6 +1209,7 @@ repeat_discovery:
sm->p_subn->min_ca_mtu = IB_MAX_MTU;
sm->p_subn->min_ca_rate = IB_MAX_RATE;
sm->p_subn->min_data_vls = IB_MAX_NUM_VLS - 1;
+ sm->p_subn->min_sw_data_vls = IB_MAX_NUM_VLS - 1;
/* rescan configuration updates */
if (!config_parsed && osm_subn_rescan_conf_files(sm->p_subn) < 0)
@@ -1199,6 +1199,7 @@ ib_api_status_t osm_subn_init(IN osm_subn_t * p_subn, IN osm_opensm_t * p_osm,
p_subn->min_ca_mtu = IB_MAX_MTU;
p_subn->min_ca_rate = IB_MAX_RATE;
p_subn->min_data_vls = IB_MAX_NUM_VLS - 1;
+ p_subn->min_sw_data_vls = IB_MAX_NUM_VLS - 1;
p_subn->ignore_existing_lfts = TRUE;
/* we assume master by default - so we only need to set it true if STANDBY */