<br><br>
<div class="gmail_quote">On Wed, Aug 5, 2009 at 3:04 PM, Sasha Khapyorsky <span dir="ltr"><<a href="mailto:sashak@voltaire.com">sashak@voltaire.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div class="h5">On 08:47 Tue 04 Aug     , Hal Rosenstock wrote:<br>><br>> Signed-off-by: Hal Rosenstock <<a href="mailto:hal.rosenstock@gmail.com">hal.rosenstock@gmail.com</a>><br>> ---<br>> diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c<br>
> index bf39926..925cb27 100644<br>> --- a/opensm/opensm/osm_trap_rcv.c<br>> +++ b/opensm/opensm/osm_trap_rcv.c<br>> @@ -2,6 +2,7 @@<br>>   * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved.<br>>   * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved.<br>
>   * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.<br>> + * Copyright (c) 2009 HNR Consulting. All rights reserved.<br>>   *<br>>   * This software is available to you under a choice of one of two<br>
>   * licenses.  You may choose to be licensed under the terms of the GNU<br>> @@ -546,42 +547,47 @@ trap_rcv_process_request(IN osm_sm_t * sm,<br>>               }<br>>       }<br>><br>> -     /* Check for node description update. IB Spec v1.2.1 pg 823 */<br>
> -     if (p_ntci->data_details.ntc_144.local_changes & TRAP_144_MASK_OTHER_LOCAL_CHANGES &&<br>> -         p_ntci->data_details.ntc_144.change_flgs & TRAP_144_MASK_NODE_DESCRIPTION_CHANGE) {<br>
> -             OSM_LOG(sm->p_log, OSM_LOG_INFO, "Trap 144 Node description update\n");<br>> -<br>> -             if (p_physp) {<br>> -                     CL_PLOCK_ACQUIRE(sm->p_lock);<br>> -                     osm_req_get_node_desc(sm, p_physp);<br>
> -                     CL_PLOCK_RELEASE(sm->p_lock);<br>> -             } else {<br>> -                     OSM_LOG(sm->p_log, OSM_LOG_ERROR,<br>> -                             "ERR 3812: No physical port found for "<br>
> -                             "trap 144: \"node description update\"\n");<br>> +     if (ib_notice_is_generic(p_ntci)) {<br>> +             /* Check for node description update. IB Spec v1.2.1 pg 823 */<br>
> +             if (cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 144) {<br>> +                     if (p_ntci->data_details.ntc_144.local_changes & TRAP_144_MASK_OTHER_LOCAL_CHANGES &&<br>> +                         p_ntci->data_details.ntc_144.change_flgs & TRAP_144_MASK_NODE_DESCRIPTION_CHANGE) {<br>
> +                             OSM_LOG(sm->p_log, OSM_LOG_INFO,<br>> +                                     "Trap 144 Node description update\n");<br>> +<br>> +                             if (p_physp) {<br>
> +                                     CL_PLOCK_ACQUIRE(sm->p_lock);<br>> +                                     osm_req_get_node_desc(sm, p_physp);<br>> +                                     CL_PLOCK_RELEASE(sm->p_lock);<br>
> +                             } else<br>> +                                     OSM_LOG(sm->p_log, OSM_LOG_ERROR,<br>> +                                             "ERR 3812: No physical port found for "<br>
> +                                             "trap 144: \"node description update\"\n");<br>> +                     }<br>>               }<br>> -     }<br>><br>> -     /* do a sweep if we received a trap */<br>
> -     if (sm->p_subn->opt.sweep_on_trap) {<br>> -             /* if this is trap number 128 or run_heavy_sweep is TRUE -<br>> -                update the force_heavy_sweep flag of the subnet.<br>> -                Sweep also on traps 144/145 - these traps signal a change of<br>
> -                certain port capabilities/system image guid.<br>> -                TODO: In the future this can be changed to just getting<br>> -                PortInfo on this port instead of sweeping the entire subnet. */<br>
> -             if (ib_notice_is_generic(p_ntci) &&<br>> -                 (cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 128 ||<br>> -                  cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 144 ||<br>
> -                  cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 145 ||<br>> -                  run_heavy_sweep)) {<br>> -                     OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,<br>> -                             "Forcing heavy sweep. Received trap:%u\n",<br>
> -                             cl_ntoh16(p_ntci->g_or_v.generic.trap_num));<br>> +             /* do a sweep if we received a trap */<br>> +             if (sm->p_subn->opt.sweep_on_trap) {<br>> +                     /* if this is trap number 128 or run_heavy_sweep is<br>
> +                        TRUE - update the force_heavy_sweep flag of the<br>> +                        subnet. Also, sweep also on traps 144/145 -<br>> +                        these traps signal a change of certain port<br>
> +                        capabilities/system image guid.<br>> +                        TODO: In the future this can be changed to just<br>> +                        getting PortInfo on this port instead of sweeping<br>
> +                        the entire subnet. */<br>> +                     if (cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 128 ||<br>> +                         cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 144 ||<br>
> +                         cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 145 ||<br>> +                         run_heavy_sweep) {<br>> +                             OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,<br>> +                                     "Forcing heavy sweep. Received trap:%u\n",<br>
> +                                     cl_ntoh16(p_ntci->g_or_v.generic.trap_num));<br>><br>> -                     sm->p_subn->force_heavy_sweep = TRUE;<br>> +                             sm->p_subn->force_heavy_sweep = TRUE;<br>
> +                     }<br>> +                     osm_sm_signal(sm, OSM_SIGNAL_SWEEP);<br>>               }<br>> -             osm_sm_signal(sm, OSM_SIGNAL_SWEEP);<br><br></div></div>Actually this disables sweep (light) on non generic traps. Was it desired<br>
change?</blockquote>
<div> </div>
<div>It was unintended; I'll resubmit adding that back.</div>
<div> </div>
<div>-- Hal</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span>Could you see any potential issues with it?<br><font color="#888888"><br>Sasha<br></font>
<div>
<div></div>
<div class="h5"><br>>       }<br>><br>>       /* If we reached here due to trap 129/130/131 - do not need to do<br>><br>_______________________________________________<br>general mailing list<br><a href="mailto:general@lists.openfabrics.org">general@lists.openfabrics.org</a><br>
<a href="http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general" target="_blank">http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general</a><br><br>To unsubscribe, please visit <a href="http://openib.org/mailman/listinfo/openib-general" target="_blank">http://openib.org/mailman/listinfo/openib-general</a><br>
</div></div></blockquote></div><br>