Lines Matching refs:level
150 u32 level = 0; in sidtab_level_from_count() local
154 ++level; in sidtab_level_from_count()
156 return level; in sidtab_level_from_count()
159 static int sidtab_alloc_roots(struct sidtab *s, u32 level) in sidtab_alloc_roots() argument
169 for (l = 1; l <= level; ++l) in sidtab_alloc_roots()
184 u32 level, capacity_shift, leaf_index = index / SIDTAB_LEAF_ENTRIES; in sidtab_do_lookup() local
187 level = sidtab_level_from_count(index + 1); in sidtab_do_lookup()
188 capacity_shift = level * SIDTAB_INNER_SHIFT; in sidtab_do_lookup()
191 if (alloc && sidtab_alloc_roots(s, level) != 0) in sidtab_do_lookup()
195 entry = &s->roots[level]; in sidtab_do_lookup()
196 while (level != 0) { in sidtab_do_lookup()
198 --level; in sidtab_do_lookup()
373 u32 *pos, u32 count, u32 level, in sidtab_convert_tree() argument
379 if (level != 0) { in sidtab_convert_tree()
390 pos, count, level - 1, in sidtab_convert_tree()
421 u32 count, level, pos; in sidtab_convert() local
433 level = sidtab_level_from_count(count); in sidtab_convert()
457 rc = sidtab_convert_tree(¶ms->target->roots[level], in sidtab_convert()
458 &s->roots[level], &pos, count, level, params); in sidtab_convert()
506 static void sidtab_destroy_tree(union sidtab_entry_inner entry, u32 level) in sidtab_destroy_tree() argument
510 if (level != 0) { in sidtab_destroy_tree()
517 sidtab_destroy_tree(node->entries[i], level - 1); in sidtab_destroy_tree()
533 u32 i, level; in sidtab_destroy() local
539 level = SIDTAB_MAX_LEVEL; in sidtab_destroy()
540 while (level && !s->roots[level].ptr_inner) in sidtab_destroy()
541 --level; in sidtab_destroy()
543 sidtab_destroy_tree(s->roots[level], level); in sidtab_destroy()