[ofa-general] [PATCH 0/6] opensm: Unicast Routing Cache

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Thu Oct 9 17:45:03 PDT 2008


Hi Sasha,

Sasha Khapyorsky wrote:
> Hi Yevgeny,
> 
> On 01:09 Tue 07 Oct     , Yevgeny Kliteynik wrote:
>> Actually, I was thinking about something else:
>> Currently we have switch LFT implemented as osm_fwd_tbl_t.
>> I can remove the unnecessary complexity of the osm_fwd_tbl_t by replacing
>> it with a simple uint8_t array (same as LFT buffer). Then by simple
>> comparison I will check whether the recently calculated LFT
>> matches the switch's LFT, and if there is a match, then lft_buf
>> can be freed. In this case only the switches that have LFT different
>> from the recently calculated LFT will have both tables, which would be
>> rare and temporary - on the next heavy sweep the LFTs would match, and
>> lft_buf would be freed.
>> Effectively, it won't have memory penalty.
>> It can be done in a separate patch.
> 
> Agree about separate patch. And would be really nice to have it in OFED
> 1.4 days.
> 
>>> Are you sure all the memory allocation failures are handled properly
>>> within the routing cache code ? What I mean is that NULL is returned
>>> and does this always result in a caching not used/routing recalculated
>>> ? Also, in that case, should some log message be indicated rather than
>>> hiding this ?
>> I will check it.
> 
> I think Hal is about non-checked malloc() in __cache_add_port() function.

Will take care of it

- Yevgeny

>>> Nit: doc/current-routing.txt should also be updated for this feature.
>> OK, separate patch.
> 
> Agree, it is needed too.
> 
> Sasha
> 




More information about the general mailing list