[ofa-general] [PATCH] opensm: consolidate CA and router PortInfo receiving code

Sasha Khapyorsky sashak at voltaire.com
Sun May 6 13:00:13 PDT 2007


Consolidate CA and router PortInfo receiving processing code.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 osm/opensm/osm_port_info_rcv.c |   36 +-----------------------------------
 1 files changed, 1 insertions(+), 35 deletions(-)

diff --git a/osm/opensm/osm_port_info_rcv.c b/osm/opensm/osm_port_info_rcv.c
index e12daa6..f23410b 100644
--- a/osm/opensm/osm_port_info_rcv.c
+++ b/osm/opensm/osm_port_info_rcv.c
@@ -406,37 +406,6 @@ __osm_pi_rcv_process_ca_port(
   OSM_LOG_EXIT( p_rcv->p_log );
 }
 
-/**********************************************************************
- **********************************************************************/
-static void
-__osm_pi_rcv_process_router_port(
-  IN const osm_pi_rcv_t* const p_rcv,
-  IN osm_node_t* const p_node,
-  IN osm_physp_t* const p_physp,
-  IN const ib_port_info_t* const p_pi )
-{
-  ib_net16_t orig_lid;
-
-  OSM_LOG_ENTER( p_rcv->p_log, __osm_pi_rcv_process_router_port );
-
-  UNUSED_PARAM( p_node );
-
-  /*
-    Update the PortInfo attribute.
-  */
-  osm_physp_set_port_info( p_physp, p_pi );
-
-  if ( (orig_lid = osm_physp_trim_base_lid_to_valid_range( p_physp ) ) )
-    osm_log( p_rcv->p_log, OSM_LOG_ERROR,
-	     "__osm_pi_rcv_process_router_port: ERR 0F09: "
-	     "Invalid base LID 0x%x corrected\n",
-	     cl_ntoh16 ( orig_lid) );
-
-  __osm_pi_rcv_process_endport(p_rcv, p_physp, p_pi);
-
-  OSM_LOG_EXIT( p_rcv->p_log );
-}
-
 #define IBM_VENDOR_ID  (0x5076)
 /**********************************************************************
  **********************************************************************/
@@ -851,13 +820,10 @@ osm_pi_rcv_process(
     switch( osm_node_get_type( p_node ) )
     {
     case IB_NODE_TYPE_CA:
+    case IB_NODE_TYPE_ROUTER:
       __osm_pi_rcv_process_ca_port( p_rcv,
                                     p_node, p_physp, p_pi );
       break;
-    case IB_NODE_TYPE_ROUTER:
-      __osm_pi_rcv_process_router_port( p_rcv,
-                                        p_node, p_physp, p_pi );
-      break;
     case IB_NODE_TYPE_SWITCH:
       __osm_pi_rcv_process_switch_port( p_rcv,
                                         p_node, p_physp, p_pi );
-- 
1.5.2.rc2.20.gac2a




More information about the general mailing list