[ofa-general] Re: [OPENSM] [PATCH] reroute console option
Al Chu
chu11 at llnl.gov
Wed Jul 9 08:50:11 PDT 2008
Hey Sasha,
On Wed, 2008-07-09 at 04:45 +0300, Sasha Khapyorsky wrote:
> Hi Al,
>
> On 14:25 Mon 07 Jul , Al Chu wrote:
> >
> > With all of these file-input possibilities for OpenSM routing, I don't
> > think there is a way to tell OpenSM to reroute if (for example) the file
> > input has changed but the network/fabric has not.
>
> Yes, but you can request a heavy sweep with SIGHUP or from console.
Yup. I forgot to append a "without requiring a heavy sweep" to the
above statement :-)
>
> > This is a patch to
> > add a command to the console to tell the console to reroute but not do a
> > heavy sweep.
>
> [snip...]
>
> > diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
> > index 87d6d5b..0501aa2 100644
> > --- a/opensm/opensm/osm_state_mgr.c
> > +++ b/opensm/opensm/osm_state_mgr.c
> > @@ -1020,6 +1020,7 @@ static void do_sweep(osm_sm_t * sm)
> > && sm->p_subn->sm_state != IB_SMINFO_STATE_DISCOVERING
> > && sm->p_subn->opt.force_heavy_sweep == FALSE
> > && sm->p_subn->force_heavy_sweep == FALSE
> > + && sm->p_subn->force_reroute == FALSE
> > && sm->p_subn->subnet_initialization_error == FALSE
> > && (__osm_state_mgr_light_sweep_start(sm) == IB_SUCCESS)) {
> > if (wait_for_pending_transactions(&sm->p_subn->p_osm->stats))
> > @@ -1031,11 +1032,43 @@ static void do_sweep(osm_sm_t * sm)
> > }
> > }
> >
> > + /*
> > + * If we don't need to do a heavy sweep and we want to do a reroute,
> > + * just reroute only.
> > + */
> > + if (cl_qmap_count(&sm->p_subn->sw_guid_tbl)
> > + && sm->p_subn->sm_state != IB_SMINFO_STATE_DISCOVERING
> > + && sm->p_subn->opt.force_heavy_sweep == FALSE
> > + && sm->p_subn->force_heavy_sweep == FALSE
> > + && sm->p_subn->force_reroute == TRUE
> > + && sm->p_subn->subnet_initialization_error == FALSE) {
> > + /* Reset flag */
> > + sm->p_subn->force_reroute = FALSE;
> > +
> > + /* Re-program the switches fully */
> > + sm->p_subn->ignore_existing_lfts = TRUE;
> > +
> > + osm_ucast_mgr_process(&sm->ucast_mgr);
> > +
> > + /* Reset flag */
> > + sm->p_subn->ignore_existing_lfts = FALSE;
> > +
> > + if (wait_for_pending_transactions(&sm->p_subn->p_osm->stats))
> > + return;
> > +
> > + if (!sm->p_subn->force_heavy_sweep) {
>
> I cannot see how 'force_heavy_sweep' can be triggered by
> osm_ucast_mgr_process(), but I do see that 'subnet_initialization_error'
> can be set to TRUE during re-routing. So it looks that we need to check
> this flag instead.
I added the force-heavy-sweep check more as a safeguard for any future
changes. I'll add in the 'subnet_initialization_error' check instead.
Al
> Sasha
>
> > + osm_log_msg_box(sm->p_log, OSM_LOG_VERBOSE,
> > + __FUNCTION__, "REROUTE COMPLETE");
> > + return;
> > + }
> > + }
> > +
> > /* go to heavy sweep */
> > _repeat_discovery:
> >
> > /* First of all - unset all flags */
> > sm->p_subn->force_heavy_sweep = FALSE;
> > + sm->p_subn->force_reroute = FALSE;
> > sm->p_subn->subnet_initialization_error = FALSE;
> >
> > /* rescan configuration updates */
> > --
> > 1.5.4.5
> >
>
--
Albert Chu
chu11 at llnl.gov
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
More information about the general
mailing list