The loop on all lids was missing the last one
[mirror/winof/.git] / ulp / opensm / user / opensm / osm_switch.c
index 489a4e6..3d4a538 100644 (file)
@@ -100,8 +100,8 @@ osm_switch_init(
 
   status = osm_fwd_tbl_init( &p_sw->fwd_tbl, p_si );
 
-  p_sw->p_pro = cl_zalloc( sizeof(*p_sw->p_pro) * num_ports );
-  if( p_sw->p_pro == NULL )
+  p_sw->p_prof = cl_zalloc( sizeof(*p_sw->p_prof) * num_ports );
+  if( p_sw->p_prof == NULL )
   {
     status = IB_INSUFFICIENT_MEMORY;
     goto Exit;
@@ -113,7 +113,7 @@ osm_switch_init(
     goto Exit;
 
   for( port_num = 0; port_num < num_ports; port_num++ )
-    osm_port_pro_construct( &p_sw->p_pro[port_num] );
+    osm_port_prof_construct( &p_sw->p_prof[port_num] );
 
  Exit:
   return( status );
@@ -127,7 +127,7 @@ osm_switch_destroy(
 {
   /* free memory to avoid leaks */
   osm_mcast_tbl_destroy( &p_sw->mcast_tbl );
-  cl_free( p_sw->p_pro );
+  cl_free( p_sw->p_prof );
   osm_fwd_tbl_destroy( &p_sw->fwd_tbl );
   osm_lid_matrix_destroy( &p_sw->lmx );
 }
@@ -188,7 +188,7 @@ osm_switch_get_fwd_tbl_block(
   lids_per_block = osm_fwd_tbl_get_lids_per_block( &p_sw->fwd_tbl );
   base_lid_ho = (uint16_t)(block_id * lids_per_block);
 
-  if( base_lid_ho < max_lid_ho )
+  if( base_lid_ho <= max_lid_ho )
   {
     cl_memclr( p_block, IB_SMP_DATA_SIZE );
     /*
@@ -276,7 +276,7 @@ osm_switch_recommend_path(
     return (OSM_NO_PATH);
 
   /*
-    First, enquire with the forwarding table for an existing
+    First, inquire with the forwarding table for an existing
     route.  If one is found, honor it unless:
     1. the ignore existing flag is set.
     2. the physical port is not a valid one or not healthy
@@ -354,8 +354,8 @@ osm_switch_recommend_path(
           the number of paths through this port.  Select
           the port routing the least number of paths.
         */
-        check_count = osm_port_pro_path_count_get(
-          &p_sw->p_pro[port_num] );
+        check_count = osm_port_prof_path_count_get(
+          &p_sw->p_prof[port_num] );
 
         /*
           Advanced LMC routing requires tracking of the
@@ -470,7 +470,7 @@ osm_switch_prepare_path_rebuild(
   num_ports = osm_switch_get_num_ports( p_sw );
   osm_lid_matrix_clear( &p_sw->lmx );
   for( port_num = 0; port_num < num_ports; port_num++ )
-    osm_port_pro_construct( &p_sw->p_pro[port_num] );
+    osm_port_prof_construct( &p_sw->p_prof[port_num] );
 }
 
 /**********************************************************************