Skip to content

Commit

Permalink
[IPV4]: The scheduled removal of multipath cached routing support.
Browse files Browse the repository at this point in the history
With help from Chris Wedgwood.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 11, 2007
1 parent 4eb6bf6 commit e06e7c6
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 1,314 deletions.
19 changes: 0 additions & 19 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,25 +262,6 @@ Who: Richard Purdie <rpurdie@rpsys.net>

---------------------------

What: Multipath cached routing support in ipv4
When: in 2.6.23
Why: Code was merged, then submitter immediately disappeared leaving
us with no maintainer and lots of bugs. The code should not have
been merged in the first place, and many aspects of it's
implementation are blocking more critical core networking
development. It's marked EXPERIMENTAL and no distribution
enables it because it cause obscure crashes due to unfixable bugs
(interfaces don't return errors so memory allocation can't be
handled, calling contexts of these interfaces make handling
errors impossible too because they get called after we've
totally commited to creating a route object, for example).
This problem has existed for years and no forward progress
has ever been made, and nobody steps up to try and salvage
this code, so we're going to finally just get rid of it.
Who: David S. Miller <davem@davemloft.net>

---------------------------

What: read_dev_chars(), read_conf_data{,_lpm}() (s390 common I/O layer)
When: December 2007
Why: These functions are a leftover from 2.4 times. They have several
Expand Down
1 change: 0 additions & 1 deletion include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ header-y += in6.h
header-y += in_route.h
header-y += ioctl.h
header-y += ipmi_msgdefs.h
header-y += ip_mp_alg.h
header-y += ipsec.h
header-y += ipx.h
header-y += irda.h
Expand Down
22 changes: 0 additions & 22 deletions include/linux/ip_mp_alg.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/linux/rtnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ enum rtattr_type_t
RTA_FLOW,
RTA_CACHEINFO,
RTA_SESSION,
RTA_MP_ALGO,
RTA_MP_ALGO, /* no longer used */
RTA_TABLE,
__RTA_MAX
};
Expand Down
1 change: 0 additions & 1 deletion include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ struct dst_entry
#define DST_NOXFRM 2
#define DST_NOPOLICY 4
#define DST_NOHASH 8
#define DST_BALANCED 0x10
unsigned long expires;

unsigned short header_len; /* more space at head required */
Expand Down
16 changes: 0 additions & 16 deletions include/net/ip_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ struct fib_config {
int fc_mx_len;
int fc_mp_len;
u32 fc_flow;
u32 fc_mp_alg;
u32 fc_nlflags;
struct nl_info fc_nlinfo;
};
Expand Down Expand Up @@ -85,9 +84,6 @@ struct fib_info {
int fib_nhs;
#ifdef CONFIG_IP_ROUTE_MULTIPATH
int fib_power;
#endif
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
u32 fib_mp_alg;
#endif
struct fib_nh fib_nh[0];
#define fib_dev fib_nh[0].nh_dev
Expand All @@ -103,10 +99,6 @@ struct fib_result {
unsigned char nh_sel;
unsigned char type;
unsigned char scope;
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
__be32 network;
__be32 netmask;
#endif
struct fib_info *fi;
#ifdef CONFIG_IP_MULTIPLE_TABLES
struct fib_rule *r;
Expand Down Expand Up @@ -145,14 +137,6 @@ struct fib_result_nl {
#define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev)
#define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif)

#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
#define FIB_RES_NETWORK(res) ((res).network)
#define FIB_RES_NETMASK(res) ((res).netmask)
#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */
#define FIB_RES_NETWORK(res) (0)
#define FIB_RES_NETMASK(res) (0)
#endif /* CONFIG_IP_ROUTE_MULTIPATH_WRANDOM */

struct fib_table {
struct hlist_node tb_hlist;
u32 tb_id;
Expand Down
96 changes: 0 additions & 96 deletions include/net/ip_mp_alg.h

This file was deleted.

1 change: 0 additions & 1 deletion include/net/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ struct rtable

unsigned rt_flags;
__u16 rt_type;
__u16 rt_multipath_alg;

__be32 rt_dst; /* Path destination */
__be32 rt_src; /* Path source */
Expand Down
42 changes: 0 additions & 42 deletions net/ipv4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -116,48 +116,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_MULTIPATH_CACHED
bool "IP: equal cost multipath with caching support (EXPERIMENTAL)"
depends on IP_ROUTE_MULTIPATH
help
Normally, equal cost multipath routing is not supported by the
routing cache. If you say Y here, alternative routes are cached
and on cache lookup a route is chosen in a configurable fashion.

If unsure, say N.

config IP_ROUTE_MULTIPATH_RR
tristate "MULTIPATH: round robin algorithm"
depends on IP_ROUTE_MULTIPATH_CACHED
help
Multipath routes are chosen according to Round Robin

config IP_ROUTE_MULTIPATH_RANDOM
tristate "MULTIPATH: random algorithm"
depends on IP_ROUTE_MULTIPATH_CACHED
help
Multipath routes are chosen in a random fashion. Actually,
there is no weight for a route. The advantage of this policy
is that it is implemented stateless and therefore introduces only
a very small delay.

config IP_ROUTE_MULTIPATH_WRANDOM
tristate "MULTIPATH: weighted random algorithm"
depends on IP_ROUTE_MULTIPATH_CACHED
help
Multipath routes are chosen in a weighted random fashion.
The per route weights are the weights visible via ip route 2. As the
corresponding state management introduces some overhead routing delay
is increased.

config IP_ROUTE_MULTIPATH_DRR
tristate "MULTIPATH: interface round robin algorithm"
depends on IP_ROUTE_MULTIPATH_CACHED
help
Connections are distributed in a round robin fashion over the
available interfaces. This policy makes sense if the connections
should be primarily distributed on interfaces and not on routes.

config IP_ROUTE_VERBOSE
bool "IP: verbose route monitoring"
depends on IP_ADVANCED_ROUTER
Expand Down
5 changes: 0 additions & 5 deletions net/ipv4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@ obj-$(CONFIG_INET_TUNNEL) += tunnel4.o
obj-$(CONFIG_INET_XFRM_MODE_TRANSPORT) += xfrm4_mode_transport.o
obj-$(CONFIG_INET_XFRM_MODE_TUNNEL) += xfrm4_mode_tunnel.o
obj-$(CONFIG_IP_PNP) += ipconfig.o
obj-$(CONFIG_IP_ROUTE_MULTIPATH_RR) += multipath_rr.o
obj-$(CONFIG_IP_ROUTE_MULTIPATH_RANDOM) += multipath_random.o
obj-$(CONFIG_IP_ROUTE_MULTIPATH_WRANDOM) += multipath_wrandom.o
obj-$(CONFIG_IP_ROUTE_MULTIPATH_DRR) += multipath_drr.o
obj-$(CONFIG_NETFILTER) += netfilter.o netfilter/
obj-$(CONFIG_IP_VS) += ipvs/
obj-$(CONFIG_INET_DIAG) += inet_diag.o
obj-$(CONFIG_IP_ROUTE_MULTIPATH_CACHED) += multipath.o
obj-$(CONFIG_INET_TCP_DIAG) += tcp_diag.o
obj-$(CONFIG_NET_TCPPROBE) += tcp_probe.o
obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o
Expand Down
4 changes: 0 additions & 4 deletions net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ const struct nla_policy rtm_ipv4_policy[RTA_MAX+1] = {
[RTA_MULTIPATH] = { .len = sizeof(struct rtnexthop) },
[RTA_PROTOINFO] = { .type = NLA_U32 },
[RTA_FLOW] = { .type = NLA_U32 },
[RTA_MP_ALGO] = { .type = NLA_U32 },
};

static int rtm_to_fib_config(struct sk_buff *skb, struct nlmsghdr *nlh,
Expand Down Expand Up @@ -515,9 +514,6 @@ static int rtm_to_fib_config(struct sk_buff *skb, struct nlmsghdr *nlh,
case RTA_FLOW:
cfg->fc_flow = nla_get_u32(attr);
break;
case RTA_MP_ALGO:
cfg->fc_mp_alg = nla_get_u32(attr);
break;
case RTA_TABLE:
cfg->fc_table = nla_get_u32(attr);
break;
Expand Down
16 changes: 0 additions & 16 deletions net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <net/tcp.h>
#include <net/sock.h>
#include <net/ip_fib.h>
#include <net/ip_mp_alg.h>
#include <net/netlink.h>
#include <net/nexthop.h>

Expand Down Expand Up @@ -697,13 +696,6 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
goto err_inval;
}
#endif
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
if (cfg->fc_mp_alg) {
if (cfg->fc_mp_alg < IP_MP_ALG_NONE ||
cfg->fc_mp_alg > IP_MP_ALG_MAX)
goto err_inval;
}
#endif

err = -ENOBUFS;
if (fib_info_cnt >= fib_hash_size) {
Expand Down Expand Up @@ -791,10 +783,6 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
#endif
}

#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
fi->fib_mp_alg = cfg->fc_mp_alg;
#endif

if (fib_props[cfg->fc_type].error) {
if (cfg->fc_gw || cfg->fc_oif || cfg->fc_mp)
goto err_inval;
Expand Down Expand Up @@ -940,10 +928,6 @@ int fib_semantic_match(struct list_head *head, const struct flowi *flp,
res->type = fa->fa_type;
res->scope = fa->fa_scope;
res->fi = fa->fa_info;
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
res->netmask = mask;
res->network = zone & inet_make_mask(prefixlen);
#endif
atomic_inc(&res->fi->fib_clntref);
return 0;
}
Expand Down
Loading

0 comments on commit e06e7c6

Please sign in to comment.