[IPV4]: Increase number of possible routing tables to 2^32

Increase the number of possible routing tables to 2^32 by replacing the
fixed sized array of pointers by a hash table and replacing iterations
over all possible table IDs by hash table walking.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy
2006-08-10 23:10:46 -07:00
committed by David S. Miller
parent 9e762a4a89
commit 1af5a8c4a1
5 changed files with 100 additions and 81 deletions

View File

@@ -172,8 +172,8 @@ static struct fib_table *fib_empty_table(void)
u32 id;
for (id = 1; id <= RT_TABLE_MAX; id++)
if (fib_tables[id] == NULL)
return __fib_new_table(id);
if (fib_get_table(id) == NULL)
return fib_new_table(id);
return NULL;
}