From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, greearb@candelatech.com,
Patrick McHardy <kaber@trash.net>
Subject: [RFC NET 00/04]: Increase number of possible routing tables
Date: Mon, 3 Jul 2006 09:52:59 +0200 (MEST) [thread overview]
Message-ID: <20060703075259.6286.67397.sendpatchset@localhost.localdomain> (raw)
I took on Ben's challenge to increase the number of possible routing tables,
these are the resulting patches.
The table IDs are changed to 32 bit values and are contained in a new netlink
routing attribute. For compatibility rtm_table in struct rtmsg can still be
used to access the first 255 tables and contains the low 8 bit of the table
ID in case of dumps. Unfortunately there are no invalid values for rtm_table,
so the best userspace can do in case of a new iproute version that tries to
access tables > 255 on an old kernel is to use RTM_UNSPEC (0) for rtm_table,
which will make the kernel allocate an empty table instead of silently adding
routes to a more or less random table. The iproute patch will follow shortly.
The hash tables are statically sized since on-the-fly resizing would require
introducing locking in the packet processing path (currently we need none),
if this is a problem we could just directly attach table references to rules,
since tables are never deleted or freed this would be a simple change.
One spot is still missing (nl_fib_lookup), so these patches are purely a RFC
for now. Tested only with IPv4, I mainly converted DECNET as well to keep it
in sync and because iteration over all possible table values, as done in many
spots, has an unacceptable overhead with 32 bit values.
include/linux/rtnetlink.h | 11 +++
include/net/dn_fib.h | 7 +-
include/net/ip_fib.h | 39 ++++---------
net/decnet/dn_fib.c | 62 ++-------------------
net/decnet/dn_route.c | 1
net/decnet/dn_rules.c | 12 ++--
net/decnet/dn_table.c | 133 ++++++++++++++++++++++++++++++++--------------
net/ipv4/fib_frontend.c | 115 +++++++++++++++++++++++++--------------
net/ipv4/fib_hash.c | 30 +++++-----
net/ipv4/fib_lookup.h | 4 -
net/ipv4/fib_rules.c | 18 +++---
net/ipv4/fib_semantics.c | 5 +
net/ipv4/fib_trie.c | 32 +++++------
net/ipv4/route.c | 1
net/ipv6/route.c | 1
15 files changed, 255 insertions(+), 216 deletions(-)
Patrick McHardy:
[NET]: Use u32 for routing table IDs
[NET]: Introduce RTA_TABLE routing attribute
[IPV4]: Increase number of possible routing tables to 2^32
[DECNET]: Increase number of possible routing tables to 2^32
next reply other threads:[~2006-07-03 7:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-03 7:52 Patrick McHardy [this message]
2006-07-03 7:53 ` [RFC NET 01/04]: Use u32 for routing table IDs Patrick McHardy
2006-07-03 7:53 ` [RFC NET 02/04]: Introduce RTA_TABLE routing attribute Patrick McHardy
2006-07-03 7:53 ` [RFC IPV4 03/04]: Increase number of possible routing tables to 2^32 Patrick McHardy
2006-07-03 7:53 ` [RFC DECNET 04/04]: " Patrick McHardy
2006-07-03 11:20 ` Steven Whitehouse
2006-07-03 11:21 ` Patrick McHardy
2006-07-03 9:23 ` [RFC NET 00/04]: Increase number of possible routing tables Patrick McHardy
2006-07-03 9:38 ` Patrick McHardy
2006-07-03 11:34 ` Thomas Graf
2006-07-03 11:36 ` Patrick McHardy
2006-07-03 11:41 ` Thomas Graf
2006-07-07 8:05 ` Patrick McHardy
2006-07-07 18:13 ` Ben Greear
2006-07-07 19:58 ` Patrick McHardy
2006-07-07 23:59 ` David Miller
2006-07-08 2:45 ` Patrick McHardy
2006-07-08 1:07 ` Ben Greear
2006-07-08 2:48 ` Patrick McHardy
2006-07-08 5:06 ` Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060703075259.6286.67397.sendpatchset@localhost.localdomain \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=greearb@candelatech.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).