[NETNS][IPV6] rt6_stats - dynamically allocate the routes statistics

This patch allocates the rt6_stats struct dynamically when the fib6 is
initialized. That provides the ability to create several instances of
this structure for the network namespaces.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Daniel Lezcano
2008-03-03 23:33:43 -08:00
committed by David S. Miller
parent dcabb819a6
commit 6cc118bd50
3 changed files with 20 additions and 12 deletions

View File

@ -2354,11 +2354,11 @@ static const struct file_operations ipv6_route_proc_fops = {
static int rt6_stats_seq_show(struct seq_file *seq, void *v)
{
seq_printf(seq, "%04x %04x %04x %04x %04x %04x %04x\n",
rt6_stats.fib_nodes, rt6_stats.fib_route_nodes,
rt6_stats.fib_rt_alloc, rt6_stats.fib_rt_entries,
rt6_stats.fib_rt_cache,
rt6_stats->fib_nodes, rt6_stats->fib_route_nodes,
rt6_stats->fib_rt_alloc, rt6_stats->fib_rt_entries,
rt6_stats->fib_rt_cache,
atomic_read(&ip6_dst_ops.entries),
rt6_stats.fib_discarded_routes);
rt6_stats->fib_discarded_routes);
return 0;
}