Skip to content

: Increase number of possible routing tables

Patrick McHardy netdev 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 12 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6: Use u32 for routing table IDsinclude/net/dn_fib.h include/net/ip_fib.h net/decnet/dn_fib.c +7 more+31 -311 reply
2/6: Introduce RTA_TABLE/FRA_TABLE attributesinclude/linux/fib_rules.h include/linux/rtnetlink.h include/net/fib_rules.h +10 more+45 -123 replies
3/6: Increase number of possible routing tables to 2^32include/net/ip_fib.h net/ipv4/fib_frontend.c net/ipv4/fib_hash.c +2 more+101 -821 reply
4/6: Increase number of possible routing tables to 2^32include/net/ip6_route.h net/ipv6/ip6_fib.c net/ipv6/route.c+159 -1471 reply
5/6: Increase number of possible routing tables to 2^32include/net/dn_fib.h net/decnet/dn_fib.c net/decnet/dn_rules.c +1 more+93 -861 reply
6/6: Increate RT_TABLE_MAX to 2^32include/linux/rtnetlink.h+1 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [NET 00/06]: Increase number of possible routing tables

These are the updated patches (against net-2.6.19) to increase the number of possible routing tables to 2^32. They basically consist of four parts:

- Use u32 for routing table IDs everywhere inside the kernel

- Introduce new netlink attributes to carry extended table IDs and add compatibility functions to use either rtm_table or the new attributes if given.

- Prepare IPv4/IPv6/DecNET for increasing RT_TABLE_MAX to 2^32 by using hash tables instead of a fixed size array of pointers (IPv4 and DecNET, IPv6 already contains that part) and replacing iterations over all possible table IDs by hash walking.

- Finally, increase RT_TABLE_MAX to 2^32

IPv4 and IPv6 are tested with and without CONFIG_MULTIPLE_TABLES, DecNET is only compile tested.

 include/linux/fib_rules.h |    4 +
 include/linux/rtnetlink.h |   12 ++-
 include/net/dn_fib.h      |    7 -
 include/net/fib_rules.h   |    7 +
 include/net/ip6_route.h   |    7 +
 include/net/ip_fib.h      |   39 +++-------
 net/core/fib_rules.c      |    5 -
 net/decnet/dn_fib.c       |   62 +---------------
 net/decnet/dn_route.c     |    1 
 net/decnet/dn_rules.c     |    2 
 net/decnet/dn_table.c     |  136 ++++++++++++++++++++++++++----------
 net/ipv4/fib_frontend.c   |  117 ++++++++++++++++++++-----------
 net/ipv4/fib_hash.c       |   30 ++++----
 net/ipv4/fib_lookup.h     |    4 -
 net/ipv4/fib_rules.c      |    7 +
 net/ipv4/fib_semantics.c  |    5 -
 net/ipv4/fib_trie.c       |   32 ++++----
 net/ipv4/route.c          |    1 
 net/ipv6/fib6_rules.c     |    1 
 net/ipv6/ip6_fib.c        |  171 ++++++++++++++++++++++++++++++++++++++++------
 net/ipv6/route.c          |  141 ++-----------------------------------
 21 files changed, 430 insertions(+), 361 deletions(-)

Patrick McHardy:
[NET]: Use u32 for routing table IDs
[NET]: Introduce RTA_TABLE/FRA_TABLE attributes [IPV4]: Increase number of possible routing tables to 2^32 [IPV6]: Increase number of possible routing tables to 2^32 [DECNET]: Increase number of possible routing tables to 2^32 [NET]: Increate RT_TABLE_MAX to 2^32