David S. Miller wrote:
From: Ben Greear <[EMAIL PROTECTED]>
Date: Mon, 25 Jul 2005 14:13:20 -0700


From what I remember, a new message could be added with a 32-bit
or so routing table identifier.  It should be backwards compatible since
and old version of IP would never create or access the routing tables > 0xFF,
and any newer version of 'ip' could use the new message format.

Any reason that wouldn't work with minimal fuss?


Well, fib_tables[] is the array of pointers we use, indexed
by table ID.  That's statically built into the kernel image,
how large would you like to make it?  This is controlled by
RT_TABLE_MAX, which BTW is the local table and some apps
may depend upon that relationship.

Maybe we need an RT_TABLE_LOCAL_IDX that remains at 0xFF and
have a new RT_TABLE_MAX that can be set at compile time via
the kernel-config scripts.  That would require a bit
of hackery in the logic, both user-space and kernel space,
to deal with the special LOCAL idx, but breaking backwards
compat would be infinately worse.

Personally, I'd like the netlink message to use a u32, though
in practice I doubt I'd go over 4000 routes for the next 2-3 years.

I definitely don't like the idea of making the pointer array
for fib_tables[] dynamically allocated, that means this change
has a real cost for everyone, not just the people who want
more than 256 table IDs.

I'm fine with a compile-time limit, which should not require any
dynamic allocation.

And the list of implications at the implementation level goes
on and on.

Even if you fix the hash table at compile time and add a small
bit of special-case code to keep the first 255 with the same
layout?

(For what it's worth, with a bit of careless use of 'ip', you can
currently screw up the local routing table anyway..or could a year
or 3 ago when I first implemented my logic and found the 255 limit
the hard way.)

See why there is always so little interest and incentive to make
this change?  And perhaps even what you're trying to accomplish
can be done with some other machinery.

I bind to local IPs to force traffic out a particular interface,
using an arbitrary gateway.  I haven't found anything else other
than using a routing table per device that accomplishes this in
an elegant manner.

Thanks,
Ben

--
Ben Greear <[EMAIL PROTECTED]>
Candela Technologies Inc  http://www.candelatech.com

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to