Skip to content

Commit

Permalink
ipv4: Remove fib_hash.
Browse files Browse the repository at this point in the history
The time has finally come to remove the hash based routing table
implementation in ipv4.

FIB Trie is mature, well tested, and I've done an audit of it's code
to confirm that it implements insert, delete, and lookup with the same
identical semantics as fib_hash did.

If there are any semantic differences found in fib_trie, we should
simply fix them.

I've placed the trie statistic config option under advanced router
configuration.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
  • Loading branch information
David S. Miller committed Feb 1, 2011
1 parent 2ba4514 commit 3630b7c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1,101 deletions.
38 changes: 1 addition & 37 deletions net/ipv4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,45 +55,9 @@ config IP_ADVANCED_ROUTER

If unsure, say N here.

choice
prompt "Choose IP: FIB lookup algorithm (choose FIB_HASH if unsure)"
depends on IP_ADVANCED_ROUTER
default ASK_IP_FIB_HASH

config ASK_IP_FIB_HASH
bool "FIB_HASH"
---help---
Current FIB is very proven and good enough for most users.

config IP_FIB_TRIE
bool "FIB_TRIE"
---help---
Use new experimental LC-trie as FIB lookup algorithm.
This improves lookup performance if you have a large
number of routes.

LC-trie is a longest matching prefix lookup algorithm which
performs better than FIB_HASH for large routing tables.
But, it consumes more memory and is more complex.

LC-trie is described in:

IP-address lookup using LC-tries. Stefan Nilsson and Gunnar Karlsson
IEEE Journal on Selected Areas in Communications, 17(6):1083-1092,
June 1999

An experimental study of compression methods for dynamic tries
Stefan Nilsson and Matti Tikkanen. Algorithmica, 33(1):19-33, 2002.
<http://www.csc.kth.se/~snilsson/software/dyntrie2/>

endchoice

config IP_FIB_HASH
def_bool ASK_IP_FIB_HASH || !IP_ADVANCED_ROUTER

config IP_FIB_TRIE_STATS
bool "FIB TRIE statistics"
depends on IP_FIB_TRIE
depends on IP_ADVANCED_ROUTER
---help---
Keep track of statistics on structure of FIB TRIE table.
Useful for testing and measuring TRIE performance.
Expand Down
4 changes: 1 addition & 3 deletions net/ipv4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ obj-y := route.o inetpeer.o protocol.o \
tcp_minisocks.o tcp_cong.o \
datagram.o raw.o udp.o udplite.o \
arp.o icmp.o devinet.o af_inet.o igmp.o \
fib_frontend.o fib_semantics.o \
fib_frontend.o fib_semantics.o fib_trie.o \
inet_fragment.o

obj-$(CONFIG_SYSCTL) += sysctl_net_ipv4.o
obj-$(CONFIG_IP_FIB_HASH) += fib_hash.o
obj-$(CONFIG_IP_FIB_TRIE) += fib_trie.o
obj-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_IP_MULTIPLE_TABLES) += fib_rules.o
obj-$(CONFIG_IP_MROUTE) += ipmr.o
Expand Down
Loading

0 comments on commit 3630b7c

Please sign in to comment.