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