Lines Matching refs:bits
116 #define IS_TNODE(n) ((n)->bits)
117 #define IS_LEAF(n) (!(n)->bits)
122 unsigned char bits; /* 2log(KEYLENGTH) bits needed */ member
138 #define tn_bits kv[0].bits
214 return (1ul << tn->bits) & ~(1ul); in child_length()
319 static struct tnode *tnode_alloc(int bits) in tnode_alloc() argument
324 if (bits > TNODE_VMALLOC_MAX) in tnode_alloc()
328 size = TNODE_SIZE(1ul << bits); in tnode_alloc()
365 l->bits = 0; in leaf_new()
375 static struct key_vector *tnode_new(t_key key, int pos, int bits) in tnode_new() argument
377 unsigned int shift = pos + bits; in tnode_new()
382 BUG_ON(!bits || (shift > KEYLENGTH)); in tnode_new()
384 tnode = tnode_alloc(bits); in tnode_new()
389 sizeof(struct key_vector *) << bits); in tnode_new()
391 if (bits == KEYLENGTH) in tnode_new()
394 tnode->empty_children = 1ul << bits; in tnode_new()
399 tn->bits = bits; in tnode_new()
410 return n && ((n->pos + n->bits) == tn->pos) && IS_TNODE(n); in tnode_full()
494 tnode_free_size += TNODE_SIZE(1ul << tn->bits); in tnode_free()
544 tn = tnode_new(oldtnode->key, oldtnode->pos - 1, oldtnode->bits + 1); in inflate()
575 if (inode->bits == 1) { in inflate()
595 node1 = tnode_new(inode->key | m, inode->pos, inode->bits - 1); in inflate()
598 node0 = tnode_new(inode->key, inode->pos, inode->bits - 1); in inflate()
639 tn = tnode_new(oldtnode->key, oldtnode->pos + 1, oldtnode->bits - 1); in halve()
717 slen_max = min_t(unsigned char, tn->pos + tn->bits - 1, tn->slen); in update_suffix()
828 return (used > 1) && (tn->bits > 1) && ((100 * used) < threshold); in should_halve()
838 if ((tn->bits == KEYLENGTH) && tn_info(tn)->full_children) in should_collapse()
963 if (index >= (1ul << n->bits)) { in fib_find_node()
1485 if (index >= (1ul << n->bits)) in fib_table_lookup()
1789 if (cindex >> pn->bits) in leaf_walk_rcu()
1805 if (cindex >= (1ul << pn->bits)) { in leaf_walk_rcu()
1873 cindex = 1ul << n->bits; in fib_trie_free()
1991 cindex = 1ul << n->bits; in fib_table_flush_external()
2061 cindex = 1ul << n->bits; in fib_table_flush()
2136 cindex = 1ul << n->bits; in __fib_info_notify_update()
2534 if (n->bits < MAX_STAT_DEPTH) in trie_collect_stats()
2535 s->nodesizes[n->bits]++; in trie_collect_stats()
2800 &prf, KEYLENGTH - n->pos - n->bits, n->bits, in fib_trie_seq_show()