fib_trie: Add slen to fib alias
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Wed, 25 Feb 2015 23:31:44 +0000 (15:31 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2015 21:37:07 +0000 (16:37 -0500)
Make use of an empty spot in the alias to store the suffix length so that
we don't need to pull that information from the leaf_info structure.

This patch also makes a slight change to the user statistics.  Instead of
incrementing semantic_match_miss once per leaf_info miss we now just
increment it once per leaf if a match was not found.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_lookup.h
net/ipv4/fib_trie.c

index 3cd444f..ae2e6ee 100644 (file)
@@ -11,6 +11,7 @@ struct fib_alias {
        u8                      fa_tos;
        u8                      fa_type;
        u8                      fa_state;
+       u8                      fa_slen;
        struct rcu_head         rcu;
 };
 
Simple merge