[openib-general] [PATCH] OpenSM/osm_sa_link_record.c: Only need base LID rather than LID range in __osm_lr_rcv_get_physp_link

Hal Rosenstock halr at voltaire.com
Tue Jun 20 10:24:28 PDT 2006


OpenSM/osm_sa_link_record.c: Only need base LID rather than LID range in
__osm_lr_rcv_get_physp_link

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: opensm/osm_sa_link_record.c
===================================================================
--- opensm/osm_sa_link_record.c	(revision 8140)
+++ opensm/osm_sa_link_record.c	(working copy)
@@ -166,13 +166,10 @@ __osm_lr_rcv_build_physp_link(
 /**********************************************************************
  **********************************************************************/
 static void
-__get_lid_range(
+__get_base_lid(
   IN const osm_physp_t*  p_physp,
-  OUT uint16_t *         p_base_lid,
-  OUT uint16_t *         p_max_lid )
+  OUT uint16_t *         p_base_lid )
 {
-  uint8_t                lmc;
-
   if(p_physp->p_node->node_info.node_type == IB_NODE_TYPE_SWITCH)
   {
     *p_base_lid =
@@ -180,14 +177,11 @@ __get_lid_range(
         osm_physp_get_base_lid(
           osm_node_get_physp_ptr(p_physp->p_node, 0))
         );
-    *p_max_lid = *p_base_lid;
   }
   else
   {
     *p_base_lid =
       cl_ntoh16(osm_physp_get_base_lid(p_physp));
-    lmc = osm_physp_get_lmc( p_physp );
-    *p_max_lid = (uint16_t)(*p_base_lid + (1<<lmc) - 1);
   }
 }
 
@@ -206,8 +200,6 @@ __osm_lr_rcv_get_physp_link(
   uint8_t                     src_port_num;
   uint8_t                     dest_port_num;
   ib_net16_t                  from_base_lid_ho;
-  ib_net16_t                  from_max_lid_ho;
-  ib_net16_t                  to_max_lid_ho;
   ib_net16_t                  to_base_lid_ho;
 
   OSM_LOG_ENTER( p_rcv->p_log, __osm_lr_rcv_get_physp_link );
@@ -312,8 +304,8 @@ __osm_lr_rcv_get_physp_link(
              dest_port_num );
   }
 
-  __get_lid_range(p_src_physp, &from_base_lid_ho, &from_max_lid_ho);
-  __get_lid_range(p_dest_physp, &to_base_lid_ho, &to_max_lid_ho);
+  __get_base_lid(p_src_physp, &from_base_lid_ho);
+  __get_base_lid(p_dest_physp, &to_base_lid_ho);
 
   __osm_lr_rcv_build_physp_link(p_rcv, cl_ntoh16(from_base_lid_ho),
                                 cl_ntoh16(to_base_lid_ho),







More information about the general mailing list