Lines Matching refs:l
357 struct key_vector *l; in leaf_new() local
365 l = kv->kv; in leaf_new()
366 l->key = key; in leaf_new()
367 l->pos = 0; in leaf_new()
368 l->bits = 0; in leaf_new()
369 l->slen = fa->fa_slen; in leaf_new()
372 INIT_HLIST_HEAD(&l->leaf); in leaf_new()
373 hlist_add_head(&fa->fa_list, &l->leaf); in leaf_new()
375 return l; in leaf_new()
1017 struct key_vector *n, *l; in fib_insert_node() local
1019 l = leaf_new(key, new); in fib_insert_node()
1020 if (!l) in fib_insert_node()
1053 NODE_INIT_PARENT(l, tp); in fib_insert_node()
1054 put_child_root(tp, key, l); in fib_insert_node()
1059 node_free(l); in fib_insert_node()
1068 struct key_vector *l, struct fib_alias *new, in fib_insert_alias() argument
1071 if (!l) in fib_insert_alias()
1079 hlist_for_each_entry(last, &l->leaf, fa_list) { in fib_insert_alias()
1091 hlist_add_head_rcu(&new->fa_list, &l->leaf); in fib_insert_alias()
1095 if (l->slen < new->fa_slen) { in fib_insert_alias()
1096 l->slen = new->fa_slen; in fib_insert_alias()
1126 struct key_vector *l, *tp; in fib_table_insert() local
1148 l = fib_find_node(t, &tp, key); in fib_table_insert()
1149 fa = l ? fib_find_alias(&l->leaf, slen, tos, fi->fib_priority, in fib_table_insert()
1275 err = fib_insert_alias(t, tp, l, new_fa, fa, key); in fib_table_insert()
1517 struct key_vector *l, struct fib_alias *old) in fib_remove_alias() argument
1529 if (hlist_empty(&l->leaf)) { in fib_remove_alias()
1530 if (tp->slen == l->slen) in fib_remove_alias()
1532 put_child_root(tp, l->key, NULL); in fib_remove_alias()
1533 node_free(l); in fib_remove_alias()
1543 l->slen = fa->fa_slen; in fib_remove_alias()
1553 struct key_vector *l, *tp; in fib_table_delete() local
1564 l = fib_find_node(t, &tp, key); in fib_table_delete()
1565 if (!l) in fib_table_delete()
1568 fa = fib_find_alias(&l->leaf, slen, tos, 0, tb->tb_id); in fib_table_delete()
1608 fib_remove_alias(t, tp, l, fa_to_delete); in fib_table_delete()
1737 struct key_vector *l, *tp = ot->kv; in fib_trie_unmerge() local
1752 while ((l = leaf_walk_rcu(&tp, key)) != NULL) { in fib_trie_unmerge()
1755 hlist_for_each_entry(fa, &l->leaf, fa_list) { in fib_trie_unmerge()
1770 local_l = fib_find_node(lt, &local_tp, l->key); in fib_trie_unmerge()
1773 NULL, l->key)) { in fib_trie_unmerge()
1780 key = l->key + 1; in fib_trie_unmerge()
1781 if (key < l->key) in fib_trie_unmerge()
2020 static void fib_leaf_notify(struct net *net, struct key_vector *l, in fib_leaf_notify() argument
2025 hlist_for_each_entry_rcu(fa, &l->leaf, fa_list) { in fib_leaf_notify()
2037 call_fib_entry_notifier(nb, net, FIB_EVENT_ENTRY_ADD, l->key, in fib_leaf_notify()
2046 struct key_vector *l, *tp = t->kv; in fib_table_notify() local
2049 while ((l = leaf_walk_rcu(&tp, key)) != NULL) { in fib_table_notify()
2050 fib_leaf_notify(net, l, tb, nb); in fib_table_notify()
2052 key = l->key + 1; in fib_table_notify()
2054 if (key < l->key) in fib_table_notify()
2089 static int fn_trie_dump_leaf(struct key_vector *l, struct fib_table *tb, in fn_trie_dump_leaf() argument
2094 __be32 xkey = htonl(l->key); in fn_trie_dump_leaf()
2107 hlist_for_each_entry_rcu(fa, &l->leaf, fa_list) { in fn_trie_dump_leaf()
2173 struct key_vector *l, *tp = t->kv; in fib_table_dump() local
2186 while ((l = leaf_walk_rcu(&tp, key)) != NULL) { in fib_table_dump()
2189 err = fn_trie_dump_leaf(l, tb, skb, cb, filter); in fib_table_dump()
2197 key = l->key + 1; in fib_table_dump()
2203 if (key < l->key) in fib_table_dump()
2671 struct key_vector *l, **tp = &iter->tnode; in fib_route_get_idx() local
2684 while ((l = leaf_walk_rcu(tp, key)) && (pos-- > 0)) { in fib_route_get_idx()
2685 key = l->key + 1; in fib_route_get_idx()
2687 l = NULL; in fib_route_get_idx()
2694 if (l) in fib_route_get_idx()
2695 iter->key = l->key; /* remember it */ in fib_route_get_idx()
2699 return l; in fib_route_get_idx()
2731 struct key_vector *l = NULL; in fib_route_seq_next() local
2738 l = leaf_walk_rcu(&iter->tnode, key); in fib_route_seq_next()
2740 if (l) { in fib_route_seq_next()
2741 iter->key = l->key; in fib_route_seq_next()
2747 return l; in fib_route_seq_next()
2785 struct key_vector *l = v; in fib_route_seq_show() local
2795 prefix = htonl(l->key); in fib_route_seq_show()
2797 hlist_for_each_entry_rcu(fa, &l->leaf, fa_list) { in fib_route_seq_show()