[ofa-general] osm_link_mgr.c:link_mgr_get_smsl question

Hal Rosenstock hal.rosenstock at gmail.com
Fri Aug 7 11:38:26 PDT 2009


Hi Sasha,

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 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 ?

-- Hal



More information about the general mailing list