Commit 6fe3ff4b authored by Randy Dunlap's avatar Randy Dunlap Committed by David S. Miller

[IPV6]: Add IPv6 routing table statistic: fib_discarded_routes.

parent 1882dbed
......@@ -114,6 +114,7 @@ struct rt6_statistics {
__u32 fib_rt_alloc; /* permanent routes */
__u32 fib_rt_entries; /* rt entries in table */
__u32 fib_rt_cache; /* cache routes */
__u32 fib_discarded_routes;
};
#define RTN_TL_ROOT 0x0001
......
......@@ -896,6 +896,7 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,
*rtp = rt->u.next;
rt->rt6i_node = NULL;
rt6_stats.fib_rt_entries--;
rt6_stats.fib_discarded_routes++;
/* Adjust walkers */
read_lock(&fib6_walker_lock);
......
......@@ -1786,11 +1786,12 @@ extern struct rt6_statistics rt6_stats;
static int rt6_stats_seq_show(struct seq_file *seq, void *v)
{
seq_printf(seq, "%04x %04x %04x %04x %04x %04x\n",
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,
atomic_read(&ip6_dst_ops.entries));
atomic_read(&ip6_dst_ops.entries),
rt6_stats.fib_discarded_routes);
return 0;
}
......
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