[openib-general] [PATCH][TRIVIAL] OpenSM: Eliminate unused max_port_profile parameter

Hal Rosenstock halr at voltaire.com
Tue Sep 12 02:35:15 PDT 2006


OpenSM: Eliminate unused max_port_profile parameter in OpenSM subnet
options structure

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

Index: include/opensm/osm_subnet.h
===================================================================
--- include/opensm/osm_subnet.h	(revision 9424)
+++ include/opensm/osm_subnet.h	(working copy)
@@ -269,7 +269,6 @@ typedef struct _osm_subn_opt
   boolean_t                console;
   cl_map_t                 port_prof_ignore_guids;
   boolean_t                port_profile_switch_nodes;
-  uint32_t                 max_port_profile;
   osm_pfn_ui_extension_t   pfn_ui_pre_lid_assign;
   void *                   ui_pre_lid_assign_ctx;
   osm_pfn_ui_mcast_extension_t pfn_ui_mcast_fdb_assign;
@@ -405,10 +404,6 @@ typedef struct _osm_subn_opt
 *		If TRUE will count the number of switch nodes routed through
 *		the link. If FALSE - only CA/RT nodes are counted.
 *
-*	max_port_profile
-*		Prevent routing through a port subscribed with more than this
-*		number of routes.
-*
 *	pfn_ui_pre_lid_assign
 *		A UI function to be invoked prior to lid assigment. It should
 *		return 1 if any change was made to any lid or 0 otherwise.
Index: include/opensm/osm_switch.h
===================================================================
--- include/opensm/osm_switch.h	(revision 9347)
+++ include/opensm/osm_switch.h	(working copy)
@@ -1108,7 +1108,6 @@ osm_switch_recommend_path(
 	IN OUT uint16_t *p_num_used_sys,
 	IN OUT uint64_t *remote_node_guids,
 	IN OUT uint16_t *p_num_used_nodes,
-	IN const uint32_t max_routes_subscribed,
 	IN boolean_t      ui_ucast_fdb_assign_func_defined
  );
 /*
@@ -1139,12 +1138,6 @@ osm_switch_recommend_path(
 *  p_num_used_nodes
 *     [in out] The number of remote nodes used for routing to the port.
 *
-*  max_routes_subscribed
-*     [in] The maximum allowed number of target lids routed through 
-*     a specific port of the switch. If the port already assigned 
-*     (in the lfdb) this number of target lids - it will not be used
-*     even if it has the smallest hops count to the target lid.
-*
 *  ui_ucast_fdb_assign_func_defined
 *     [in] If TRUE - this means that there is a ui ucast_fdb_assign table
 *     function defined (in pfn_ui_ucast_fdb_assign in subnet opts). This
Index: opensm/osm_subnet.c
===================================================================
--- opensm/osm_subnet.c	(revision 9423)
+++ opensm/osm_subnet.c	(working copy)
@@ -483,7 +483,6 @@ osm_subn_set_default_opt(
   p_opt->no_qos = FALSE;
   p_opt->accum_log_file = TRUE;
   p_opt->port_profile_switch_nodes = FALSE;
-  p_opt->max_port_profile = 0xffffffff;
   p_opt->pfn_ui_pre_lid_assign = NULL;
   p_opt->ui_pre_lid_assign_ctx = NULL;
   p_opt->pfn_ui_mcast_fdb_assign = NULL;
Index: opensm/osm_switch.c
===================================================================
--- opensm/osm_switch.c	(revision 9427)
+++ opensm/osm_switch.c	(working copy)
@@ -233,7 +233,6 @@ osm_switch_recommend_path(
   IN OUT uint16_t *p_num_used_sys,
   IN OUT uint64_t *remote_node_guids,
   IN OUT uint16_t *p_num_used_nodes,
-  IN const uint32_t max_routes_subscribed,
   IN boolean_t      ui_ucast_fdb_assign_func_defined
   )
 {
@@ -425,8 +424,7 @@ osm_switch_recommend_path(
         /*
           the count is min but also lower then the max subscribed
         */
-        if( (check_count < least_paths) &&
-            (check_count <= max_routes_subscribed))
+        if( check_count < least_paths )
         {
           port_found = TRUE;
           best_port = port_num;
Index: opensm/osm_ucast_mgr.c
===================================================================
--- opensm/osm_ucast_mgr.c	(revision 9347)
+++ opensm/osm_ucast_mgr.c	(working copy)
@@ -281,7 +281,7 @@ __osm_ucast_mgr_dump_ucast_routes(
       best_port = osm_switch_recommend_path(
         p_sw, lid_ho, TRUE,
         NULL, NULL, NULL, NULL, /* No LMC Optimization */
-        0xffffffff, ui_ucast_fdb_assign_func_defined );
+        ui_ucast_fdb_assign_func_defined );
       sprintf( line, "No %u hop path possible via port %u!",
                best_hops, best_port );
       strcat( p_mgr->p_report_buf, line );
@@ -752,12 +752,10 @@ __osm_ucast_mgr_process_port(
       port = osm_switch_recommend_path( p_sw, lid_ho, ignore_existing,
                                         remote_sys_guids, &num_used_sys,
                                         remote_node_guids, &num_used_nodes,
-                                        p_mgr->p_subn->opt.max_port_profile,
                                         ui_ucast_fdb_assign_func_defined );
     else
       port = osm_switch_recommend_path( p_sw, lid_ho, ignore_existing,
                                         NULL, NULL, NULL, NULL,
-                                        p_mgr->p_subn->opt.max_port_profile,
                                         ui_ucast_fdb_assign_func_defined );
 
     /*







More information about the general mailing list