aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip6_fib.h
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2012-10-21 23:42:09 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-23 02:38:32 -0400
commit51ebd3181572af8d5076808dab2682d800f6da5d (patch)
tree41bce53f5ed82791ea5975f6ce708f54729659b4 /include/net/ip6_fib.h
parentd94ce9b283736a876b2e6dec665c68e5e8b5d55e (diff)
ipv6: add support of equal cost multipath (ECMP)
Each nexthop is added like a single route in the routing table. All routes that have the same metric/weight and destination but not the same gateway are considering as ECMP routes. They are linked together, through a list called rt6i_siblings. ECMP routes can be added in one shot, with RTA_MULTIPATH attribute or one after the other (in both case, the flag NLM_F_EXCL should not be set). The patch is based on a previous work from Luc Saillard <luc.saillard@6wind.com>. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r--include/net/ip6_fib.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 8a2a203eb15d..20210d79e36a 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -47,6 +47,8 @@ struct fib6_config {
47 unsigned long fc_expires; 47 unsigned long fc_expires;
48 struct nlattr *fc_mx; 48 struct nlattr *fc_mx;
49 int fc_mx_len; 49 int fc_mx_len;
50 int fc_mp_len;
51 struct nlattr *fc_mp;
50 52
51 struct nl_info fc_nlinfo; 53 struct nl_info fc_nlinfo;
52}; 54};
@@ -99,6 +101,14 @@ struct rt6_info {
99 101
100 struct in6_addr rt6i_gateway; 102 struct in6_addr rt6i_gateway;
101 103
104 /* Multipath routes:
105 * siblings is a list of rt6_info that have the the same metric/weight,
106 * destination, but not the same gateway. nsiblings is just a cache
107 * to speed up lookup.
108 */
109 struct list_head rt6i_siblings;
110 unsigned int rt6i_nsiblings;
111
102 atomic_t rt6i_ref; 112 atomic_t rt6i_ref;
103 113
104 /* These are in a separate cache line. */ 114 /* These are in a separate cache line. */