[openib-general] [PATCH] OpenSM/osm_ucast_updn.c: In __updn_bfs_by_node, no longer check against max_lid

Hal Rosenstock halr at voltaire.com
Mon Jan 22 06:08:19 PST 2007


OpenSM/osm_ucast_updn.c: In __updn_bfs_by_node, no longer check against
max_lid

Eliminate __updn_bfs_by_node: ERR AA09: Invalid lid for switch by no
longer checking CA/router LID for being within range of 1 to max lid of
neighbor switch.

This is because most of the destination lids (root_lid) have not been
populated yet in the forwarding tables (so max_sw_lid is small) and we
are only now creating them.  So this test doesn't make any sense any
more since the generation of the LFTs has been relaxed.

Signed-off-by: Dale Purdy <purdy at sgi.com>
Signed-off-by: Hal Rosenstock <halr at voltaire.com>

diff --git a/osm/opensm/osm_ucast_updn.c b/osm/opensm/osm_ucast_updn.c
index 5476b26..0142f98 100644
--- a/osm/opensm/osm_ucast_updn.c
+++ b/osm/opensm/osm_ucast_updn.c
@@ -233,7 +233,7 @@ __updn_bfs_by_node(
   uint8_t pn, pn_rem;
   osm_physp_t   *p_physp, *p_remote_physp;
   cl_list_t     *p_currList, *p_nextList;
-  uint16_t root_lid, max_sw_lid;
+  uint16_t root_lid;
   updn_next_step_t *p_updn_switch, *p_tmp;
   updn_switch_dir_t next_dir, current_dir;
   osm_log_t *p_log = &p_updn->p_osm->log;
@@ -303,30 +303,13 @@ __updn_bfs_by_node(
       else
       {
         p_self_node = p_remote_physp->p_node->sw;
-        max_sw_lid = osm_switch_get_max_lid_ho(p_self_node);
-        if ((1 <= root_lid) && (root_lid <= max_sw_lid))
-          /* Update its Min Hop Table */
-        {
-          /* NOTE : Check if there is a function which prints the Min Hop Table */
-          osm_log( p_log, OSM_LOG_DEBUG,
-                   "__updn_bfs_by_node: "
-                   "Update Min Hop Table of GUID 0x%" PRIx64 "\n",
-                   cl_ntoh64(p_remote_physp->port_guid) );
-          osm_switch_set_hops(p_self_node, root_lid,
-                              p_remote_physp->port_num, 1);
-
-        }
-        else
-        {
-          osm_log( p_log, OSM_LOG_ERROR,
-                   "__updn_bfs_by_node: ERR AA09: "
-                   "Invalid lid 0x%x for switch 0x%" PRIx64 " max lid 0x%x\n",
-                   root_lid,
-                   cl_ntoh64(p_self_node->p_node->node_info.port_guid),
-                   max_sw_lid );
-          OSM_LOG_EXIT( p_log );
-          return 1;
-        }
+        /* Update its Min Hop Table */
+        /* NOTE : Check if there is a function which prints the Min Hop Table */
+        osm_log( p_log, OSM_LOG_DEBUG,
+                 "__updn_bfs_by_node: "
+                 "Update Min Hop Table of GUID 0x%" PRIx64 "\n",
+                 cl_ntoh64(p_remote_physp->port_guid) );
+        osm_switch_set_hops(p_self_node, root_lid, p_remote_physp->port_num, 1);
       }
     }
   }







More information about the general mailing list