Lines Matching defs:tnode
130 DECLARE_FLEX_ARRAY(struct key_vector __rcu *, tnode);
134 struct tnode {
143 #define TNODE_SIZE(n) offsetof(struct tnode, kv[0].tnode[n])
189 static inline struct tnode *tn_info(struct key_vector *kv)
191 return container_of(kv, struct tnode, kv[0]);
196 #define get_child(tn, i) rtnl_dereference((tn)->tnode[i])
200 #define get_child_rcu(tn, i) rcu_dereference_rtnl((tn)->tnode[i])
250 * if n is an internal node - a 'tnode' here, the various parts of its key
305 struct tnode *n = container_of(head, struct tnode, rcu);
315 static struct tnode *tnode_alloc(int bits)
351 struct tnode *kv;
375 struct tnode *tnode;
380 tnode = tnode_alloc(bits);
381 if (!tnode)
384 pr_debug("AT %p s=%zu %zu\n", tnode, TNODE_SIZE(0),
388 tnode->full_children = 1;
390 tnode->empty_children = 1ul << bits;
392 tn = tnode->kv;
401 /* Check whether a tnode 'n' is "full", i.e. it is an internal node
438 rcu_assign_pointer(tn->tnode[i], n);
452 /* Either update the children of a tnode that
467 rcu_assign_pointer(tp->tnode[0], n);
493 tn = container_of(head, struct tnode, rcu)->kv;
567 /* drop the node in the old tnode free list */
688 /* scan the tnode looking for that one child that might still exist */
758 * All of those will be doubled in the resulting inflated tnode, so
854 /* track the tnode via the pointer from the parent instead of
1118 * Add a new tnode here
1119 * first tnode need some special handling
1487 struct key_vector __rcu **cptr = n->tnode;
1540 cptr = &pn->tnode[cindex];
1809 /* if we are at the limit for keys just return NULL for the tnode */
1835 /* drop emptied tnode */
2421 struct key_vector *tnode;
2429 struct key_vector *pn = iter->tnode;
2433 iter->tnode, iter->index, iter->depth);
2443 iter->tnode = pn;
2447 iter->tnode = n;
2463 iter->tnode = pn;
2478 n = rcu_dereference(pn->tnode[0]);
2483 iter->tnode = n;
2487 iter->tnode = pn;
2615 " %zd bytes, size of tnode: %zd bytes.\n",
2822 struct key_vector *tnode;
2830 struct key_vector *l, **tp = &iter->tnode;
2876 iter->tnode = t->kv;
2897 l = leaf_walk_rcu(&iter->tnode, key);