@@ -197,6 +197,12 @@ static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
struct osm_routing_engine *re = sm->p_subn->p_osm->routing_engine_used;
osm_physp_t *p_physp;
+ /*
+ * Do nothing unless the most recent routing attempt was successful.
+ */
+ if (!re)
+ return IB_SUCCESS;
+
if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH) {
if (ib_port_info_get_vl_cap(&p->port_info) == 1) {
/* Check port 0's capability mask */
> I think that it would be better
> not to apply QoS configuration if unicast manager failed - just
> restart the sweep.
I think you are right. Something like this?
b/opensm/opensm/osm_state_mgr.c
@@ -1113,7 +1113,11 @@ static void do_sweep(osm_sm_t * sm)
/* Re-program the switches fully */
sm->p_subn->ignore_existing_lfts = TRUE;
- osm_ucast_mgr_process(&sm->ucast_mgr);
+ if (osm_ucast_mgr_process(&sm->ucast_mgr)) {
+ OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE,
+ "REROUTE FAILED");
+ return;
+ }
osm_qos_setup(sm->p_subn->p_osm);
/* Reset flag */
@@ -1272,12 +1276,14 @@ repeat_discovery:
"LID ASSIGNMENT COMPLETE - STARTING SWITCH TABLE CONFIG");
/*
- * Proceed with unicast forwarding table configuration.
+ * Proceed with unicast forwarding table configuration; repeat
+ * if unicast routing fails.
*/
if (!sm->ucast_mgr.cache_valid ||
osm_ucast_cache_process(&sm->ucast_mgr))
- osm_ucast_mgr_process(&sm->ucast_mgr);
+ if (osm_ucast_mgr_process(&sm->ucast_mgr))
+ goto repeat_discovery;
osm_qos_setup(sm->p_subn->p_osm);
b/opensm/opensm/osm_ucast_mgr.c
@@ -955,6 +955,7 @@ int osm_ucast_mgr_process(IN osm_ucast_mgr_t *
p_mgr)
osm_opensm_t *p_osm;
struct osm_routing_engine *p_routing_eng;
cl_qmap_t *p_sw_guid_tbl;
+ int failed = 0;
OSM_LOG_ENTER(p_mgr->p_log);