]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: FIB Local/MAIN table collapse
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Fri, 6 Mar 2015 21:47:00 +0000 (13:47 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Mar 2015 20:22:14 +0000 (16:22 -0400)
commit3ee5fffe85d089e553c468c1f8bf8fb3ebed016b
tree28c93b0c6eb9389182f60736103b6bfc0b61cedc
parent12ec97ba9d1aae5e04ce25ce2bb7299e608dbf78
ipv4: FIB Local/MAIN table collapse

This patch is meant to collapse local and main into one by converting
tb_data from an array to a pointer.  Doing this allows us to point the
local table into the main while maintaining the same variables in the
table.

As such the tb_data was converted from an array to a pointer, and a new
array called data is added in order to still provide an object for tb_data
to point to.

In order to track the origin of the fib aliases a tb_id value was added in
a hole that existed on 64b systems.  Using this we can also reverse the
merge in the event that custom FIB rules are enabled.

With this patch I am seeing an improvement of 20ns to 30ns for routing
lookups as long as custom rules are not enabled, with custom rules enabled
we fall back to split tables and the original behavior.

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