[openib-general] [PATCH] Opensm - client reregistration
Yael Kalka
yael at mellanox.co.il
Thu Feb 9 04:10:47 PST 2006
Hi Hal,
Currently, the OpenSM sends PortInfo with ClientReRegistration bit
turned on only during the first sweep after becoming Master.
This doesn't cover all cases where ClientReRegistration should be
turned on. OpenSM should turn on this bit also on new ports it
discovers (in cases of subnet merging, for example).
The following patch adds support for turning on ClientReRegistration
bit on newly discovered ports.
Thanks,
Yael
Signed-off-by: Yael Kalka <yael at mellanox.co.il>
Index: opensm/osm_lid_mgr.c
===================================================================
--- opensm/osm_lid_mgr.c (revision 5337)
+++ opensm/osm_lid_mgr.c (working copy)
@@ -897,6 +897,7 @@ __osm_lid_mgr_get_port_lid(
static boolean_t
__osm_lid_mgr_set_physp_pi(
IN osm_lid_mgr_t * const p_mgr,
+ IN osm_port_t* const p_port,
IN osm_physp_t* const p_physp,
IN ib_net16_t const lid )
{
@@ -910,6 +911,7 @@ __osm_lid_mgr_set_physp_pi(
uint8_t op_vls;
uint8_t port_num;
boolean_t send_set = FALSE;
+ boolean_t new_port = FALSE;
OSM_LOG_ENTER( p_mgr->p_log, __osm_lid_mgr_set_physp_pi );
@@ -1140,8 +1142,17 @@ __osm_lid_mgr_set_physp_pi(
/*
We need to set the cli_rereg bit when we are in first_time_master_sweep for
ports supporting the ClientReregistration Vol1 (v1.2) p811 14.4.11
+ Also, if this port was just now discovered - then we should also set the
+ cli_rereg bit. We know that the port was just discovered if it is in
+ the p_subn->new_port_list list.
*/
- if ( ( p_mgr->p_subn->first_time_master_sweep == TRUE ) &&
+ if ( cl_is_object_in_list(&p_mgr->p_subn->new_ports_list, p_port) )
+ /* p_port is in new_ports_list - mark new_port as TRUE */
+ new_port = TRUE;
+ }
+
+ if ( ( p_mgr->p_subn->first_time_master_sweep == TRUE ||
+ new_port == TRUE ) &&
( (p_old_pi->capability_mask & IB_PORT_CAP_HAS_CLIENT_REREG) != 0 ) )
ib_port_info_set_client_rereg( p_pi, 1 );
else
@@ -1243,7 +1254,7 @@ __osm_lid_mgr_process_our_sm_node(
*/
p_physp = osm_port_get_default_phys_ptr( p_port );
- __osm_lid_mgr_set_physp_pi( p_mgr, p_physp, cl_hton16( min_lid_ho ) );
+ __osm_lid_mgr_set_physp_pi( p_mgr, p_port, p_physp, cl_hton16( min_lid_ho ) );
Exit:
OSM_LOG_EXIT( p_mgr->p_log );
@@ -1367,7 +1378,7 @@ osm_lid_mgr_process_subnet(
p_physp = osm_port_get_default_phys_ptr( p_port );
/* the proc returns the fact it sent a set port info */
- if (__osm_lid_mgr_set_physp_pi( p_mgr, p_physp, cl_hton16( min_lid_ho )))
+ if (__osm_lid_mgr_set_physp_pi( p_mgr, p_port, p_physp, cl_hton16( min_lid_ho )))
p_mgr->send_set_reqs = TRUE;
}
} /* all ports */
More information about the general
mailing list