opensm/osm_switch: Don't inline osm_switch_sp0_is_lmc_capable function

Also, some cosmetic formatting changes

Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>

diff --git a/opensm/include/opensm/osm_switch.h 
b/opensm/include/opensm/osm_switch.h
index c1521a6..cb6ac53 100644
--- a/opensm/include/opensm/osm_switch.h
+++ b/opensm/include/opensm/osm_switch.h
@@ -251,7 +251,6 @@ osm_switch_get_hop_count(IN const osm_switch_t * const p_sw,
        return (lid_ho > p_sw->max_lid_ho || !p_sw->hops[lid_ho]) ?
            OSM_NO_PATH : p_sw->hops[lid_ho][port_num];
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -285,7 +284,6 @@ static inline osm_fwd_tbl_t *osm_switch_get_fwd_tbl_ptr(IN 
const osm_switch_t *
 {
        return ((osm_fwd_tbl_t *) & p_sw->fwd_tbl);
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -371,7 +369,6 @@ osm_switch_get_least_hops(IN const osm_switch_t * const 
p_sw,
        return (lid_ho > p_sw->max_lid_ho || !p_sw->hops[lid_ho]) ?
            OSM_NO_PATH : p_sw->hops[lid_ho][0];
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -437,7 +434,6 @@ osm_switch_get_port_by_lid(IN const osm_switch_t * const 
p_sw,
 {
        return (osm_fwd_tbl_get(&p_sw->fwd_tbl, lid_ho));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -517,7 +513,6 @@ static inline osm_physp_t *osm_switch_get_route_by_lid(IN 
const osm_switch_t *
        else
                return NULL;
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -547,14 +542,9 @@ static inline osm_physp_t *osm_switch_get_route_by_lid(IN 
const osm_switch_t *
 *      Returns whether switch port 0 (SP0) can support LMC
 *
 */
-static inline unsigned
+unsigned
 osm_switch_sp0_is_lmc_capable(IN const osm_switch_t * const p_sw,
-                             IN osm_subn_t * p_subn)
-{
-       return (p_subn->opt.lmc_esp0 &&
-               ib_switch_info_is_enhanced_port0(&p_sw->switch_info)) ? 1 : 0;
-}
-
+                             IN osm_subn_t * p_subn);
 /*
 * PARAMETERS
 *      p_sw
@@ -588,7 +578,6 @@ osm_switch_get_max_block_id(IN const osm_switch_t * const 
p_sw)
        return ((uint32_t) (osm_fwd_tbl_get_size(&p_sw->fwd_tbl) /
                            osm_fwd_tbl_get_lids_per_block(&p_sw->fwd_tbl)));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -620,7 +609,6 @@ osm_switch_get_max_block_id_in_use(IN const osm_switch_t * 
const p_sw)
                                                    cl_ntoh16(p_sw->switch_info.
                                                              lin_top)));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -684,7 +672,6 @@ osm_switch_supports_mcast(IN const osm_switch_t * const 
p_sw)
 {
        return (p_sw->switch_info.mcast_cap != 0);
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -716,7 +703,6 @@ osm_switch_set_switch_info(IN osm_switch_t * const p_sw,
        CL_ASSERT(p_si);
        p_sw->switch_info = *p_si;
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -747,7 +733,6 @@ osm_switch_count_path(IN osm_switch_t * const p_sw, IN 
const uint8_t port)
 {
        osm_port_prof_path_count_inc(&p_sw->p_prof[port]);
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -781,7 +766,6 @@ osm_switch_set_ft_block(IN osm_switch_t * const p_sw,
        CL_ASSERT(p_sw);
        return (osm_fwd_tbl_set_block(&p_sw->fwd_tbl, p_block, block_num));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -819,7 +803,6 @@ osm_switch_set_mft_block(IN osm_switch_t * const p_sw,
        return (osm_mcast_tbl_set_block(&p_sw->mcast_tbl, p_block,
                                        block_num, position));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -861,7 +844,6 @@ osm_switch_get_mft_block(IN osm_switch_t * const p_sw,
        return (osm_mcast_tbl_get_block(&p_sw->mcast_tbl,
                                        block_num, position, p_block));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -901,7 +883,6 @@ osm_switch_get_mft_max_block(IN osm_switch_t * const p_sw)
        CL_ASSERT(p_sw);
        return (osm_mcast_tbl_get_max_block(&p_sw->mcast_tbl));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -925,7 +906,6 @@ osm_switch_get_mft_max_block_in_use(IN osm_switch_t * const 
p_sw)
        CL_ASSERT(p_sw);
        return (osm_mcast_tbl_get_max_block_in_use(&p_sw->mcast_tbl));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -955,7 +935,6 @@ osm_switch_get_mft_max_position(IN osm_switch_t * const 
p_sw)
        CL_ASSERT(p_sw);
        return (osm_mcast_tbl_get_max_position(&p_sw->mcast_tbl));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -1070,7 +1049,6 @@ osm_switch_get_fwd_tbl_size(IN const osm_switch_t * const 
p_sw)
 {
        return (osm_fwd_tbl_get_size(&p_sw->fwd_tbl));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -1098,7 +1076,6 @@ osm_switch_get_mcast_fwd_tbl_size(IN const osm_switch_t * 
const p_sw)
 {
        return (cl_ntoh16(p_sw->switch_info.mcast_cap));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -1127,7 +1104,6 @@ osm_switch_path_count_get(IN const osm_switch_t * const 
p_sw,
 {
        return (osm_port_prof_path_count_get(&p_sw->p_prof[port_num]));
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -1186,7 +1162,6 @@ static inline osm_mcast_tbl_t 
*osm_switch_get_mcast_tbl_ptr(IN const
 {
        return ((osm_mcast_tbl_t *) & p_sw->mcast_tbl);
 }
-
 /*
 * PARAMETERS
 *      p_sw
@@ -1222,7 +1197,6 @@ osm_switch_is_in_mcast_tree(IN const osm_switch_t * const 
p_sw,
        else
                return (FALSE);
 }
-
 /*
 * PARAMETERS
 *      p_sw
diff --git a/opensm/opensm/osm_switch.c b/opensm/opensm/osm_switch.c
index a9d13c8..554bbc4 100644
--- a/opensm/opensm/osm_switch.c
+++ b/opensm/opensm/osm_switch.c
@@ -370,13 +370,15 @@ osm_switch_recommend_path(IN const osm_switch_t * const 
p_sw,
                                    osm_switch_get_hop_count(p_sw, base_lid,
                                                             port_num);
                                /*
-                                  If we aren't using pre-defined user routes 
function, then
-                                  we need to make sure that the current path 
is the minimum one.
-                                  In case of having such a user function - 
this check will not
-                                  be done, and the old routing will be used.
-                                  Note: This means that it is the user's job 
to clean all data
-                                  in the forwarding tables that he wants to be 
overridden by the
-                                  minimum hop function.
+                                  If we aren't using pre-defined user routes
+                                  function, then we need to make sure that the
+                                  current path is the minimum one. In case of
+                                  having such a user function - this check will
+                                  not be done, and the old routing will be 
used.
+                                  Note: This means that it is the user's job to
+                                  clean all data in the forwarding tables that
+                                  he wants to be overridden by the minimum
+                                  hop function.
                                 */
                                if (hops == least_hops)
                                        return (port_num);
@@ -671,3 +673,13 @@ osm_switch_recommend_mcast_path(IN osm_switch_t * const 
p_sw,
        CL_ASSERT(port_num < num_ports);
        return (port_num);
 }
+
+/**********************************************************************
+ **********************************************************************/
+unsigned
+osm_switch_sp0_is_lmc_capable(IN const osm_switch_t * const p_sw,
+                             IN osm_subn_t * p_subn)
+{
+       return (p_subn->opt.lmc_esp0 &&
+               ib_switch_info_is_enhanced_port0(&p_sw->switch_info)) ? 1 : 0;
+}


_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to