Lines Matching refs:key_vector
121 struct key_vector { struct
130 DECLARE_FLEX_ARRAY(struct key_vector __rcu *, tnode); argument
138 struct key_vector __rcu *parent;
139 struct key_vector kv[1];
168 struct key_vector kv[1];
174 static struct key_vector *resize(struct trie *t, struct key_vector *tn);
189 static inline struct tnode *tn_info(struct key_vector *kv) in tn_info()
203 static inline void node_set_parent(struct key_vector *n, struct key_vector *tp) in node_set_parent()
214 static inline unsigned long child_length(const struct key_vector *tn) in child_length()
221 static inline unsigned long get_index(t_key key, struct key_vector *kv) in get_index()
307 ilog2((SIZE_MAX - TNODE_SIZE(0)) / sizeof(struct key_vector *))
338 static inline void empty_child_inc(struct key_vector *n) in empty_child_inc()
346 static inline void empty_child_dec(struct key_vector *n) in empty_child_dec()
354 static struct key_vector *leaf_new(t_key key, struct fib_alias *fa) in leaf_new()
356 struct key_vector *l; in leaf_new()
377 static struct key_vector *tnode_new(t_key key, int pos, int bits) in tnode_new()
380 struct key_vector *tn; in tnode_new()
391 sizeof(struct key_vector *) << bits); in tnode_new()
410 static inline int tnode_full(struct key_vector *tn, struct key_vector *n) in tnode_full()
418 static void put_child(struct key_vector *tn, unsigned long i, in put_child()
419 struct key_vector *n) in put_child()
421 struct key_vector *chi = get_child(tn, i); in put_child()
447 static void update_children(struct key_vector *tn) in update_children()
453 struct key_vector *inode = get_child(tn, --i); in update_children()
469 static inline void put_child_root(struct key_vector *tp, t_key key, in put_child_root()
470 struct key_vector *n) in put_child_root()
478 static inline void tnode_free_init(struct key_vector *tn) in tnode_free_init()
483 static inline void tnode_free_append(struct key_vector *tn, in tnode_free_append()
484 struct key_vector *n) in tnode_free_append()
490 static void tnode_free(struct key_vector *tn) in tnode_free()
508 static struct key_vector *replace(struct trie *t, in replace()
509 struct key_vector *oldtnode, in replace()
510 struct key_vector *tn) in replace()
512 struct key_vector *tp = node_parent(oldtnode); in replace()
527 struct key_vector *inode = get_child(tn, --i); in replace()
537 static struct key_vector *inflate(struct trie *t, in inflate()
538 struct key_vector *oldtnode) in inflate()
540 struct key_vector *tn; in inflate()
559 struct key_vector *inode = get_child(oldtnode, --i); in inflate()
560 struct key_vector *node0, *node1; in inflate()
633 static struct key_vector *halve(struct trie *t, in halve()
634 struct key_vector *oldtnode) in halve()
636 struct key_vector *tn; in halve()
654 struct key_vector *node1 = get_child(oldtnode, --i); in halve()
655 struct key_vector *node0 = get_child(oldtnode, --i); in halve()
656 struct key_vector *inode; in halve()
688 static struct key_vector *collapse(struct trie *t, in collapse()
689 struct key_vector *oldtnode) in collapse()
691 struct key_vector *n, *tp; in collapse()
709 static unsigned char update_suffix(struct key_vector *tn) in update_suffix()
727 struct key_vector *n = get_child(tn, i); in update_suffix()
804 static inline bool should_inflate(struct key_vector *tp, struct key_vector *tn) in should_inflate()
819 static inline bool should_halve(struct key_vector *tp, struct key_vector *tn) in should_halve()
833 static inline bool should_collapse(struct key_vector *tn) in should_collapse()
848 static struct key_vector *resize(struct trie *t, struct key_vector *tn) in resize()
853 struct key_vector *tp = node_parent(tn); in resize()
913 static void node_pull_suffix(struct key_vector *tn, unsigned char slen) in node_pull_suffix()
927 static void node_push_suffix(struct key_vector *tn, unsigned char slen) in node_push_suffix()
936 static struct key_vector *fib_find_node(struct trie *t, in fib_find_node()
937 struct key_vector **tp, u32 key) in fib_find_node()
939 struct key_vector *pn, *n = t->kv; in fib_find_node()
1020 struct key_vector *l, *tp; in fib_find_matching_alias()
1104 static void trie_rebalance(struct trie *t, struct key_vector *tn) in trie_rebalance()
1110 static int fib_insert_node(struct trie *t, struct key_vector *tp, in fib_insert_node()
1113 struct key_vector *n, *l; in fib_insert_node()
1129 struct key_vector *tn; in fib_insert_node()
1160 static int fib_insert_alias(struct trie *t, struct key_vector *tp, in fib_insert_alias()
1161 struct key_vector *l, struct fib_alias *new, in fib_insert_alias()
1212 static void fib_remove_alias(struct trie *t, struct key_vector *tp,
1213 struct key_vector *l, struct fib_alias *old);
1221 struct key_vector *l, *tp; in fib_table_insert()
1420 static inline t_key prefix_mismatch(t_key key, struct key_vector *n) in prefix_mismatch()
1453 struct key_vector *n, *pn; in fib_table_lookup()
1512 struct key_vector __rcu **cptr = n->tnode; in fib_table_lookup()
1651 static void fib_remove_alias(struct trie *t, struct key_vector *tp, in fib_remove_alias()
1652 struct key_vector *l, struct fib_alias *old) in fib_remove_alias()
1718 struct key_vector *l, *tp; in fib_table_delete()
1785 static struct key_vector *leaf_walk_rcu(struct key_vector **tn, t_key key) in leaf_walk_rcu()
1787 struct key_vector *pn, *n = *tn; in leaf_walk_rcu()
1845 struct key_vector *pn = t->kv; in fib_trie_free()
1852 struct key_vector *n; in fib_trie_free()
1903 struct key_vector *l, *tp = ot->kv; in fib_trie_unmerge()
1919 struct key_vector *local_l = NULL, *local_tp; in fib_trie_unmerge()
1962 struct key_vector *pn = t->kv; in fib_table_flush_external()
1970 struct key_vector *n; in fib_table_flush_external()
2032 struct key_vector *pn = t->kv; in fib_table_flush()
2041 struct key_vector *n; in fib_table_flush()
2121 struct key_vector *pn = t->kv; in __fib_info_notify_update()
2126 struct key_vector *n; in __fib_info_notify_update()
2179 static int fib_leaf_notify(struct key_vector *l, struct fib_table *tb, in fib_leaf_notify()
2216 struct key_vector *l, *tp = t->kv; in fib_table_notify()
2269 static int fn_trie_dump_leaf(struct key_vector *l, struct fib_table *tb, in fn_trie_dump_leaf()
2360 struct key_vector *l, *tp = t->kv; in fib_table_dump()
2450 struct key_vector *tnode;
2455 static struct key_vector *fib_trie_get_next(struct fib_trie_iter *iter) in fib_trie_get_next()
2458 struct key_vector *pn = iter->tnode; in fib_trie_get_next()
2466 struct key_vector *n = get_child_rcu(pn, cindex++); in fib_trie_get_next()
2498 static struct key_vector *fib_trie_get_first(struct fib_trie_iter *iter, in fib_trie_get_first()
2501 struct key_vector *n, *pn; in fib_trie_get_first()
2526 struct key_vector *n; in trie_collect_stats()
2591 bytes += sizeof(struct key_vector *) * pointers; in trie_show_stats()
2674 static struct key_vector *fib_trie_get_idx(struct seq_file *seq, loff_t pos) in fib_trie_get_idx()
2686 struct key_vector *n; in fib_trie_get_idx()
2715 struct key_vector *n; in fib_trie_seq_next()
2801 struct key_vector *n = v; in fib_trie_seq_show()
2851 struct key_vector *tnode;
2856 static struct key_vector *fib_route_get_idx(struct fib_route_iter *iter, in fib_route_get_idx()
2859 struct key_vector *l, **tp = &iter->tnode; in fib_route_get_idx()
2919 struct key_vector *l = NULL; in fib_route_seq_next()
2973 struct key_vector *l = v; in fib_route_seq_show()