• Alexander Duyck's avatar
    fib_trie: Merge tnode_free and leaf_free into node_free · 37fd30f2
    Alexander Duyck authored
    Both the leaf and the tnode had an rcu_head in them, but they had them in
    slightly different places.  Since we now have them in the same spot and
    know that any node with bits == 0 is a leaf and the rest are either vmalloc
    or kmalloc tnodes depending on the value of bits it makes it easy to combine
    the functions and reduce overhead.
    
    In addition I have taken advantage of the rcu_head pointer to go ahead and
    put together a simple linked list instead of using the tnode pointer as
    this way we can merge either type of structure for freeing.
    Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    37fd30f2
fib_trie.c 61.4 KB