Lines Matching defs:level
151 u32 level = 0;
155 ++level;
157 return level;
160 static int sidtab_alloc_roots(struct sidtab *s, u32 level)
170 for (l = 1; l <= level; ++l)
185 u32 level, capacity_shift, leaf_index = index / SIDTAB_LEAF_ENTRIES;
187 /* find the level of the subtree we need */
188 level = sidtab_level_from_count(index + 1);
189 capacity_shift = level * SIDTAB_INNER_SHIFT;
192 if (alloc && sidtab_alloc_roots(s, level) != 0)
196 entry = &s->roots[level];
197 while (level != 0) {
199 --level;
377 u32 *pos, u32 count, u32 level,
383 if (level != 0) {
394 pos, count, level - 1,
426 u32 count, level, pos;
438 level = sidtab_level_from_count(count);
462 rc = sidtab_convert_tree(¶ms->target->roots[level],
463 &s->roots[level], &pos, count, level, params);
511 static void sidtab_destroy_tree(union sidtab_entry_inner entry, u32 level)
515 if (level != 0) {
522 sidtab_destroy_tree(node->entries[i], level - 1);
538 u32 i, level;
544 level = SIDTAB_MAX_LEVEL;
545 while (level && !s->roots[level].ptr_inner)
546 --level;
548 sidtab_destroy_tree(s->roots[level], level);