Add client_rereg flag to Port Info context
PATCH 1/1 Add client_rereg flag to Port Info context
From: Ilya Nelkenbaum <ilyan-VPRAkNaXOzVWk0Htik3J/[email protected]>
In case of ports that don't set client_rereg in response the port info context will contain additional client_rereg flag that will indicate that it was already sent and therefore it won't be sent in future.
--- include/opensm/osm_madw.h | 1 + opensm/osm_lid_mgr.c | 5 ++++- opensm/osm_link_mgr.c | 1 + opensm/osm_node_info_rcv.c | 1 + opensm/osm_pkey_mgr.c | 1 + opensm/osm_port_info_rcv.c | 3 ++- opensm/osm_state_mgr.c | 1 + opensm/osm_trap_rcv.c | 1 + 8 files changed, 12 insertions(+), 2 deletions(-)
include/opensm/osm_madw.h +1 -0
@@ -182,6 +182,7 @@ typedef struct osm_pi_context {boolean_t set_method;boolean_t light_sweep;boolean_t active_transition; +boolean_t client_rereg; } osm_pi_context_t;/*********/
opensm/osm_lid_mgr.c +4 -1
@@ -1043,9 +1043,12 @@ static int lid_mgr_set_physp_pi(IN osm_lid_mgr_t * p_mgr,"Setting client rereg on %s, port %d\n" , p_port->p_node->print_desc, p_port->p_physp->port_num);ib_port_info_set_client_rereg (p_pi,1 ); + context.pi_context.client_rereg = TRUE; send_set = TRUE; - }else + }else {ib_port_info_set_client_rereg (p_pi,0 ); + context.pi_context.client_rereg = FALSE; + }/* We need to send the PortInfo Set request with the new sm_lid in the following cases:
opensm/osm_link_mgr.c +1 -0
@@ -451,6 +451,7 @@ Send: context.pi_context.port_guid =osm_physp_get_port_guid (p_physp); context.pi_context.set_method = TRUE; context.pi_context.light_sweep = FALSE; + context.pi_context.client_rereg = FALSE;/* We need to send the PortInfoSet request with the new sm_lid in the following cases:
opensm/osm_node_info_rcv.c +1 -0
@@ -307,6 +307,7 @@ static void ni_rcv_get_port_info(IN osm_sm_t * sm, IN osm_node_t * node, context.pi_context.set_method = FALSE; context.pi_context.light_sweep = FALSE; context.pi_context.active_transition = FALSE; + context.pi_context.client_rereg = FALSE;for (; port < num_ports; port++) { status = osm_req_get(sm, osm_physp_get_dr_path_ptr(physp),
opensm/osm_pkey_mgr.c +1 -0
@@ -253,6 +253,7 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log, osm_sm_t * sm, context.pi_context.set_method = TRUE; context.pi_context.light_sweep = FALSE; context.pi_context.active_transition = FALSE; + context.pi_context.client_rereg = FALSE; status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p_physp), payload, sizeof(payload),
opensm/osm_port_info_rcv.c +3 -1
@@ -566,10 +566,12 @@ void osm_pi_rcv_process(IN void *context, IN void *data)/* On receipt of client reregister, clear the reregister bit so reregistering won't be sent again and again */ -if (p_context->set_method &&ib_port_info_get_client_rereg (p_pi)) { +if (p_context->set_method && + (ib_port_info_get_client_rereg (p_pi) || p_context->client_rereg)) {OSM_LOG (sm->p_log,OSM_LOG_DEBUG ,"Client reregister received on response\n" );ib_port_info_set_client_rereg (p_pi,0 ); + p_context->client_rereg = FALSE; }/*
opensm/osm_state_mgr.c +1 -0
@@ -186,6 +186,7 @@ static void state_mgr_get_remote_port_info(IN osm_sm_t * sm, mad_context.pi_context.set_method = FALSE; mad_context.pi_context.light_sweep = TRUE; mad_context.pi_context.active_transition = FALSE; + mad_context.pi_context.client_rereg = FALSE;/* note that with some negative logic - if the query failed it means * that there is no point in going to heavy sweep */
opensm/osm_trap_rcv.c +1 -0
@@ -241,6 +241,7 @@ static int disable_port(osm_sm_t *sm, osm_physp_t *p) context.pi_context.set_method = TRUE; context.pi_context.light_sweep = FALSE; context.pi_context.active_transition = FALSE; + context.pi_context.client_rereg = FALSE;if (osm_node_get_type (p->p_node) ==IB_NODE_TYPE_SWITCH &&osm_physp_get_port_num (p) !=0 ) { physp0 =osm_node_get_physp_ptr (p->p_node,0 );
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html