[ofa-general] Re: osm_link_mgr.c:link_mgr_get_smsl question
Hal Rosenstock
hal.rosenstock at gmail.com
Sun Aug 30 04:32:41 PDT 2009
Hi Sasha,
On 8/29/09, Sasha Khapyorsky <sashak at voltaire.com> wrote:
> Hi Hal,
>
> On 14:38 Fri 07 Aug , Hal Rosenstock wrote:
> >
> > osm_link_mgr.c:link_mgr_get_smsl has the following:
> >
> > /* Find osm_port of the source = p_physp */
> > slid = osm_physp_get_base_lid(p_physp);
> > p_src_port =
> > cl_ptr_vector_get(&sm->p_subn->port_lid_tbl,
> cl_ntoh16(slid));
> >
> > /* Call lash to find proper SL */
> > sl = osm_get_lash_sl(p_osm, p_src_port, p_sm_port);
> >
> > It may be that this code is invoked prior to the LID being assigned
>
> How is it possible? In the code I can see that link_mgr_process() is
> always executed after lid_mgr run.
When nodes use gPXE, the LID is not passed from the gPXE to the Linux
environment.
> > so
> > getting the p_src_port based on the LID yields NULL and then calling
> > osm_get_lash_sl causes a seg fault.
> >
> > I can see two ways to fix this:
> > 1. Replace with port GUID search
> > 2. Have osm_get_lash_sl handle NULL for p_src_port
> > Maybe you see other ways to deal with this.
> >
> > Do you have a preferred approach ?
>
> Hmm, SMSL will be irrelevant for a port where LID was not assigned,
> right?
Of course.
> If so than it is probably just enough to add in link_mgr_get_smsl():
>
> if (!p_src_port)
> return;
OK.
-- Hal
But it would be really better to understand an error source before deciding
> about proper solution.
> Sasha
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090830/cff4b9df/attachment.html>
More information about the general
mailing list