[fib algo][dxr] Optimize trie updating.
Don't rebuild in vain trie parts unaffected by accumulated incremental RIB updates. PR: 257965 Tested by: Konrad Kreciwilk MFC after: 3 days
This commit is contained in:
parent
442c8a245e
commit
b51f8bae57
@ -915,7 +915,14 @@ dxr_build(struct dxr *dxr)
|
||||
|
||||
for (i = da->updates_low >> dxr_x; i <= da->updates_high >> dxr_x;
|
||||
i++) {
|
||||
trie_unref(da, i);
|
||||
if (!trie_rebuild) {
|
||||
m = 0;
|
||||
for (int j = 0; j < (1 << dxr_x); j += 32)
|
||||
m |= da->updates_mask[((i << dxr_x) + j) >> 5];
|
||||
if (m == 0)
|
||||
continue;
|
||||
trie_unref(da, i);
|
||||
}
|
||||
ti = trie_ref(da, i);
|
||||
if (ti < 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user