[ofa-general] Re: osm_link_mgr.c:link_mgr_get_smsl question

Sasha Khapyorsky sashak at voltaire.com
Wed Sep 23 06:03:06 PDT 2009


On 07:00 Wed 23 Sep     , Hal Rosenstock wrote:
> 
>  Let me try this again... The port LID table is fine but the lookup is done
> based on the LID in the received portInfo as it is the result of
> osm_physp_get_base_lid() (osm_link_mgr.c:link_mgr_get_smsl line 83).

Ok, makes sense.

Assuming that the case is caused by PortInfo set failure we can expect
new sweep - OpenSM will set initialization errors flag.

> In the
> case of failed Sets, this is invalid so LID 0 is used and that's what causes
> the NULL p_src_port which in turn causes the seg fault.
> 
> So I'm back to:
> 
> 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 ?

Maybe and I think that we discussed this already in this thread -
setting SMSL is useless for port which have LID uninitialized, so
something like:

	if (!p_src_port)
		return;

, or to be even more detailed

	if (!slid || !(p_src_port = osm_get_port_by_lid(&sm->p_subn, slid))) {
		OSM_LOG("print some verbose message\n");
		return;
	}

in link_mgr_get_smsl() should be good enough. Right?

Sasha



More information about the general mailing list