[ofa-general] Re: [PATCH v3 1/2] opensm: setup routing engine when in use and delete when fail

Eli Dorfman (Voltaire) dorfman.eli at gmail.com
Mon Apr 27 01:36:24 PDT 2009


Sasha Khapyorsky wrote:
> On 14:48 Sun 26 Apr     , Eli Dorfman (Voltaire) wrote:
>> delete() is called conditionally from destroy_routing_engines(osm_opensm_t *osm)
>>
>> 	if (r->delete)
>> 		r->delete(r->context);
>>
>> Also all re(s) are cleared when created so delete is NULL if setup() was not called.
> 
> Ok, you are partially right (I forgot that delete() is initialized only
> in setup() phase), but what will happen with RE where setup() and
> delete() were already called? Assumption that delete() will clear RE
> again is wrong - it just destroys its internal data.

Ok, so this may crash when opensm goes down.
This can be fixed by:

/* context is set to NULL after previous delete */
if (r->delete && r->context)
	r->delete(r->context);

> 
>> So I don't see any problem here.
> 
> Try with LASH or UPDN.... (ftree will not fail just occasionally - it
> returns when context is NULL).
> 




More information about the general mailing list