* [PATCH] opensm/osm_trap_rcv.c: Eliminate heavy sweep on receipt of trap 145
@ 2009-11-03 15:29 Hal Rosenstock
[not found] ` <20091103152932.GA7267-Wuw85uim5zDR7s880joybQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2009-11-03 15:29 UTC (permalink / raw)
To: sashak-smomgflXvOZWk0Htik3J/w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Trap 145 is sys image GUID changed and can be handled without a
new heavy sweep. New sys image GUID is present in trap and that
is the only info that needs updating.
Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c
index 91c3761..dae6e68 100644
--- a/opensm/opensm/osm_trap_rcv.c
+++ b/opensm/opensm/osm_trap_rcv.c
@@ -305,6 +305,7 @@ static void trap_rcv_process_request(IN osm_sm_t * sm,
osm_physp_t *p_physp;
cl_ptr_vector_t *p_tbl;
osm_port_t *p_port;
+ osm_node_t *p_node;
ib_net16_t source_lid = 0;
boolean_t is_gsi = TRUE;
uint8_t port_num = 0;
@@ -504,8 +505,9 @@ static void trap_rcv_process_request(IN osm_sm_t * sm,
}
/* Check for node description update. IB Spec v1.2.1 pg 823 */
- if (ib_notice_is_generic(p_ntci) &&
- cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 144 &&
+ if (!ib_notice_is_generic(p_ntci))
+ goto check_sweep;
+ if (cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 144 &&
p_ntci->data_details.ntc_144.local_changes & TRAP_144_MASK_OTHER_LOCAL_CHANGES &&
p_ntci->data_details.ntc_144.change_flgs & TRAP_144_MASK_NODE_DESCRIPTION_CHANGE) {
OSM_LOG(sm->p_log, OSM_LOG_INFO, "Trap 144 Node description update\n");
@@ -518,20 +520,25 @@ static void trap_rcv_process_request(IN osm_sm_t * sm,
OSM_LOG(sm->p_log, OSM_LOG_ERROR,
"ERR 3812: No physical port found for "
"trap 144: \"node description update\"\n");
+ goto check_sweep;
}
-
+ if (cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 145) {
+ /* update system image guid (in NodeInfo) */
+ p_node = osm_physp_get_node_ptr(p_physp);
+ p_node->node_info.sys_guid = p_ntci->data_details.ntc_145.new_sys_guid;
+ }
+check_sweep:
/* do a sweep if we received a trap */
if (sm->p_subn->opt.sweep_on_trap) {
/* if this is trap number 128 or run_heavy_sweep is TRUE -
update the force_heavy_sweep flag of the subnet.
- Sweep also on traps 144/145 - these traps signal a change of
- certain port capabilities/system image guid.
+ Sweep also on traps 144 - these traps signal a change of
+ certain port capabilities.
TODO: In the future this can be changed to just getting
PortInfo on this port instead of sweeping the entire subnet. */
if (ib_notice_is_generic(p_ntci) &&
(cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 128 ||
cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 144 ||
- cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 145 ||
run_heavy_sweep)) {
OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
"Forcing heavy sweep. Received trap:%u\n",
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] opensm/osm_trap_rcv.c: Eliminate heavy sweep on receipt of trap 145
[not found] ` <20091103152932.GA7267-Wuw85uim5zDR7s880joybQ@public.gmane.org>
@ 2009-11-29 12:50 ` Sasha Khapyorsky
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Khapyorsky @ 2009-11-29 12:50 UTC (permalink / raw)
To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 10:29 Tue 03 Nov , Hal Rosenstock wrote:
>
> Trap 145 is sys image GUID changed and can be handled without a
> new heavy sweep. New sys image GUID is present in trap and that
> is the only info that needs updating.
>
> Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Applied. Thanks.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-29 12:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-03 15:29 [PATCH] opensm/osm_trap_rcv.c: Eliminate heavy sweep on receipt of trap 145 Hal Rosenstock
[not found] ` <20091103152932.GA7267-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-11-29 12:50 ` Sasha Khapyorsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.