Lines Matching refs:t
173 static struct key_vector *resize(struct trie *t, struct key_vector *tn);
507 static struct key_vector *replace(struct trie *t, in replace() argument
530 tn = resize(t, inode); in replace()
536 static struct key_vector *inflate(struct trie *t, in inflate() argument
624 return replace(t, oldtnode, tn); in inflate()
632 static struct key_vector *halve(struct trie *t, in halve() argument
679 return replace(t, oldtnode, tn); in halve()
687 static struct key_vector *collapse(struct trie *t, in collapse() argument
847 static struct key_vector *resize(struct trie *t, struct key_vector *tn) in resize() argument
850 struct trie_use_stats __percpu *stats = t->stats; in resize()
869 tp = inflate(t, tn); in resize()
892 tp = halve(t, tn); in resize()
906 return collapse(t, tn); in resize()
935 static struct key_vector *fib_find_node(struct trie *t, in fib_find_node() argument
938 struct key_vector *pn, *n = t->kv; in fib_find_node()
1022 struct trie *t; in fib_find_matching_alias() local
1028 t = (struct trie *)tb->tb_data; in fib_find_matching_alias()
1029 l = fib_find_node(t, &tp, be32_to_cpu(fri->dst)); in fib_find_matching_alias()
1103 static void trie_rebalance(struct trie *t, struct key_vector *tn) in trie_rebalance() argument
1106 tn = resize(t, tn); in trie_rebalance()
1109 static int fib_insert_node(struct trie *t, struct key_vector *tp, in fib_insert_node() argument
1150 trie_rebalance(t, tp); in fib_insert_node()
1159 static int fib_insert_alias(struct trie *t, struct key_vector *tp, in fib_insert_alias() argument
1164 return fib_insert_node(t, tp, new, key); in fib_insert_alias()
1211 static void fib_remove_alias(struct trie *t, struct key_vector *tp,
1218 struct trie *t = (struct trie *)tb->tb_data; in fib_table_insert() local
1243 l = fib_find_node(t, &tp, key); in fib_table_insert()
1378 err = fib_insert_alias(t, tp, l, new_fa, fa, key); in fib_table_insert()
1383 l = l ? l : fib_find_node(t, &tp, key); in fib_table_insert()
1410 fib_remove_alias(t, tp, l, new_fa); in fib_table_insert()
1447 struct trie *t = (struct trie *) tb->tb_data; in fib_table_lookup() local
1449 struct trie_use_stats __percpu *stats = t->stats; in fib_table_lookup()
1457 pn = t->kv; in fib_table_lookup()
1651 static void fib_remove_alias(struct trie *t, struct key_vector *tp, in fib_remove_alias() argument
1669 trie_rebalance(t, tp); in fib_remove_alias()
1716 struct trie *t = (struct trie *) tb->tb_data; in fib_table_delete() local
1729 l = fib_find_node(t, &tp, key); in fib_table_delete()
1739 inet_dscp_to_dsfield(dscp), t); in fib_table_delete()
1774 fib_remove_alias(t, tp, l, fa_to_delete); in fib_table_delete()
1844 struct trie *t = (struct trie *)tb->tb_data; in fib_trie_free() local
1845 struct key_vector *pn = t->kv; in fib_trie_free()
1895 free_percpu(t->stats); in fib_trie_free()
1961 struct trie *t = (struct trie *)tb->tb_data; in fib_table_flush_external() local
1962 struct key_vector *pn = t->kv; in fib_table_flush_external()
1984 pn = resize(t, pn); in fib_table_flush_external()
2030 struct trie *t = (struct trie *)tb->tb_data; in fib_table_flush() local
2032 struct key_vector *pn = t->kv; in fib_table_flush()
2055 pn = resize(t, pn); in fib_table_flush()
2120 struct trie *t = (struct trie *)tb->tb_data; in __fib_info_notify_update() local
2121 struct key_vector *pn = t->kv; in __fib_info_notify_update()
2215 struct trie *t = (struct trie *)tb->tb_data; in fib_table_notify() local
2216 struct key_vector *l, *tp = t->kv; in fib_table_notify()
2256 struct trie *t = (struct trie *)tb->tb_data; in __trie_free_rcu() local
2259 free_percpu(t->stats); in __trie_free_rcu()
2359 struct trie *t = (struct trie *)tb->tb_data; in fib_table_dump() local
2360 struct key_vector *l, *tp = t->kv; in fib_table_dump()
2414 struct trie *t; in fib_trie_table() local
2431 t = (struct trie *) tb->tb_data; in fib_trie_table()
2432 t->kv[0].pos = KEYLENGTH; in fib_trie_table()
2433 t->kv[0].slen = KEYLENGTH; in fib_trie_table()
2435 t->stats = alloc_percpu(struct trie_use_stats); in fib_trie_table()
2436 if (!t->stats) { in fib_trie_table()
2499 struct trie *t) in fib_trie_get_first() argument
2503 if (!t) in fib_trie_get_first()
2506 pn = t->kv; in fib_trie_get_first()
2524 static void trie_collect_stats(struct trie *t, struct trie_stat *s) in trie_collect_stats() argument
2532 for (n = fib_trie_get_first(&iter, t); n; n = fib_trie_get_next(&iter)) { in trie_collect_stats()
2653 struct trie *t = (struct trie *) tb->tb_data; in fib_triestat_seq_show() local
2656 if (!t) in fib_triestat_seq_show()
2661 trie_collect_stats(t, &stat); in fib_triestat_seq_show()
2664 trie_show_usage(seq, t->stats); in fib_triestat_seq_show()
2789 static inline const char *rtn_type(char *buf, size_t len, unsigned int t) in rtn_type() argument
2791 if (t < __RTN_MAX && rtn_type_names[t]) in rtn_type()
2792 return rtn_type_names[t]; in rtn_type()
2793 snprintf(buf, len, "type %u", t); in rtn_type()
2895 struct trie *t; in fib_route_seq_start() local
2904 t = (struct trie *)tb->tb_data; in fib_route_seq_start()
2905 iter->tnode = t->kv; in fib_route_seq_start()