<br><br>
<div class="gmail_quote">On Wed, Aug 5, 2009 at 3:46 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 15:19 Wed 05 Aug     , Hal Rosenstock wrote:<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>> +     } else if (sm->p_subn->opt.sweep_on_trap)<br>>               osm_sm_signal(sm, OSM_SIGNAL_SWEEP);<br>> -     }<br><br></div></div>For me this part seems simpler in the original code, so I applied this<br>
patch as:<br>
<div class="im"><br>diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c<br></div>index bf39926..d2e4202 100644<br>
<div class="im">--- 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>
</div>@@ -547,7 +548,9 @@ trap_rcv_process_request(IN osm_sm_t * sm,<br>
<div class="im">       }<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></div>

<div class="im">+       if (ib_notice_is_generic(p_ntci) &&<br></div>+           cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 144 &&<br>+           p_ntci->data_details.ntc_144.local_changes & TRAP_144_MASK_OTHER_LOCAL_CHANGES &&<br>

<div class="im">           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></div>@@ -555,11 +558,10 @@ trap_rcv_process_request(IN osm_sm_t * sm,<br>
<div class="im">                       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>
</div>
<div class="im">+               } 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>       /* do a sweep if we received a trap */<br><br><br></div>Hope it is fine for you.</blockquote>
<div> </div>
<div>Sure (that's a smaller/simpler change). I'll retest to be sure when it's in the tree.</div>
<div> </div>
<div>There's more coming which may head more towards where I was trying to go but we'll see what happens with the next steps with this...</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><br><font color="#888888"><br>Sasha<br></font>
<div>
<div></div>
<div class="h5">_______________________________________________<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>