Commit f3960ea0 authored by David S. Miller's avatar David S. Miller

[IPV4]: Zap CONFIG_IP_ROUTE_TOS

These facilities are now available by default.
The config option makes no sense because:
1) It makes no change to the layout of any
   data structure, therefore it has no impact
   upon memory usage of the routing tables.
2) It makes no significant change to code size,
   only a handfull of lookup comparisons are
   protected by the option.
3) It is needed for full RFC1812 compliance anyways.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49c16d15
......@@ -176,7 +176,6 @@ CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_FWMARK=y
CONFIG_IP_ROUTE_NAT=y
# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_TOS is not set
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_PNP=y
# CONFIG_IP_PNP_DHCP is not set
......
......@@ -308,7 +308,6 @@ CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_FWMARK=y
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_TOS=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
......
......@@ -272,7 +272,6 @@ CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_TOS=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_PNP=y
# CONFIG_IP_PNP_DHCP is not set
......
......@@ -229,7 +229,6 @@ CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_TOS=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_PNP=y
# CONFIG_IP_PNP_DHCP is not set
......
......@@ -94,16 +94,6 @@ config IP_ROUTE_MULTIPATH
equal "cost" and chooses one of them in a non-deterministic fashion
if a matching packet arrives.
config IP_ROUTE_TOS
bool "IP: use TOS value as routing key"
depends on IP_ADVANCED_ROUTER
help
The header of every IP packet carries a TOS (Type Of Service) value
with which the packet requests a certain treatment, e.g. low
latency (for interactive traffic), high throughput, or high
reliability. If you say Y here, you will be able to specify
different routes for packets with different TOS values.
config IP_ROUTE_VERBOSE
bool "IP: verbose route monitoring"
depends on IP_ADVANCED_ROUTER
......
......@@ -270,11 +270,9 @@ fn_hash_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result
continue;
list_for_each_entry(fa, &f->fn_alias, fa_list) {
#ifdef CONFIG_IP_ROUTE_TOS
if (fa->fa_tos &&
fa->fa_tos != flp->fl4_tos)
continue;
#endif
if (fa->fa_scope < flp->fl4_scope)
continue;
......@@ -443,10 +441,8 @@ static struct fib_alias *fib_find_alias(struct fib_node *fn, u8 tos, u32 prio)
prev_fa = NULL;
list_for_each_entry(fa, head, fa_list) {
#ifdef CONFIG_IP_ROUTE_TOS
if (fa->fa_tos != tos)
continue;
#endif
prev_fa = fa;
if (prio <= fa->fa_info->fib_priority)
break;
......@@ -471,9 +467,6 @@ fn_hash_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
u32 key;
int err;
#ifndef CONFIG_IP_ROUTE_TOS
tos = 0;
#endif
if (z > 32)
return -EINVAL;
fz = table->fn_zones[z];
......@@ -620,9 +613,6 @@ fn_hash_delete(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
u32 key;
u8 tos = r->rtm_tos;
#ifndef CONFIG_IP_ROUTE_TOS
tos = 0;
#endif
if (z > 32)
return -EINVAL;
if ((fz = table->fn_zones[z]) == NULL)
......
......@@ -302,9 +302,7 @@ FRprintk("Lookup: %u.%u.%u.%u <- %u.%u.%u.%u ",
for (r = fib_rules; r; r=r->r_next) {
if (((saddr^r->r_src) & r->r_srcmask) ||
((daddr^r->r_dst) & r->r_dstmask) ||
#ifdef CONFIG_IP_ROUTE_TOS
(r->r_tos && r->r_tos != flp->fl4_tos) ||
#endif
#ifdef CONFIG_IP_ROUTE_FWMARK
(r->r_fwmark && r->r_fwmark != flp->fl4_fwmark) ||
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment