Lines Matching defs:tnode
128 struct key_vector __rcu *tnode[0];
132 struct tnode {
141 #define TNODE_SIZE(n) offsetof(struct tnode, kv[0].tnode[n])
187 static inline struct tnode *tn_info(struct key_vector *kv)
189 return container_of(kv, struct tnode, kv[0]);
194 #define get_child(tn, i) rtnl_dereference((tn)->tnode[i])
198 #define get_child_rcu(tn, i) rcu_dereference_rtnl((tn)->tnode[i])
248 * if n is an internal node - a 'tnode' here, the various parts of its key
309 struct tnode *n = container_of(head, struct tnode, rcu);
319 static struct tnode *tnode_alloc(int bits)
355 struct tnode *kv;
379 struct tnode *tnode;
384 tnode = tnode_alloc(bits);
385 if (!tnode)
388 pr_debug("AT %p s=%zu %zu\n", tnode, TNODE_SIZE(0),
392 tnode->full_children = 1;
394 tnode->empty_children = 1ul << bits;
396 tn = tnode->kv;
405 /* Check whether a tnode 'n' is "full", i.e. it is an internal node
442 rcu_assign_pointer(tn->tnode[i], n);
456 /* Either update the children of a tnode that
471 rcu_assign_pointer(tp->tnode[0], n);
497 tn = container_of(head, struct tnode, rcu)->kv;
571 /* drop the node in the old tnode free list */
692 /* scan the tnode looking for that one child that might still exist */
762 * All of those will be doubled in the resulting inflated tnode, so
858 /* track the tnode via the pointer from the parent instead of
1076 * Add a new tnode here
1077 * first tnode need some special handling
1464 struct key_vector __rcu **cptr = n->tnode;
1517 cptr = &pn->tnode[cindex];
1786 /* if we are at the limit for keys just return NULL for the tnode */
1812 /* drop emptied tnode */
2407 struct key_vector *tnode;
2415 struct key_vector *pn = iter->tnode;
2419 iter->tnode, iter->index, iter->depth);
2429 iter->tnode = pn;
2433 iter->tnode = n;
2449 iter->tnode = pn;
2464 n = rcu_dereference(pn->tnode[0]);
2469 iter->tnode = n;
2473 iter->tnode = pn;
2601 " %zd bytes, size of tnode: %zd bytes.\n",
2807 struct key_vector *tnode;
2815 struct key_vector *l, **tp = &iter->tnode;
2861 iter->tnode = t->kv;
2882 l = leaf_walk_rcu(&iter->tnode, key);