diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2013-09-21 16:55:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-27 17:32:16 -0400 |
commit | 8d2ca1d7b5c3e63b3a8a81ae99015b615c5f2bf7 (patch) | |
tree | 37202066f7715ffc4858c4dd9b5c66c1c8c5cd76 /include/net/ip6_fib.h | |
parent | 6229ed1f22592d5ee8360a638cb965fef88b080f (diff) |
ipv6: avoid high order memory allocations for /proc/net/ipv6_route
Dumping routes on a system with lots rt6_infos in the fibs causes up to
11-order allocations in seq_file (which fail). While we could switch
there to vmalloc we could just implement the streaming interface for
/proc/net/ipv6_route. This patch switches /proc/net/ipv6_route from
single_open_net to seq_open_net.
loff_t *pos tracks dst entries.
Also kill never used struct rt6_proc_arg and now unused function
fib6_clean_all_ro.
Cc: Ben Greear <greearb@candelatech.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r-- | include/net/ip6_fib.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index eab88f0e2088..6738f3409a6f 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -280,10 +280,6 @@ struct fib6_node *fib6_locate(struct fib6_node *root, const struct in6_addr *daddr, int dst_len, const struct in6_addr *saddr, int src_len); -void fib6_clean_all_ro(struct net *net, - int (*func)(struct rt6_info *, void *arg), - int prune, void *arg); - void fib6_clean_all(struct net *net, int (*func)(struct rt6_info *, void *arg), int prune, void *arg); @@ -299,6 +295,8 @@ void fib6_gc_cleanup(void); int fib6_init(void); +int ipv6_route_open(struct inode *inode, struct file *file); + #ifdef CONFIG_IPV6_MULTIPLE_TABLES int fib6_rules_init(void); void fib6_rules_cleanup(void); |