summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/ip6_fib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/fib/ip6_fib.c')
-rw-r--r--src/vnet/fib/ip6_fib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c
index f37ae0d2f45..3400987018f 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -524,6 +524,18 @@ ip6_fib_table_show_one (ip6_fib_t *fib,
FIB_ENTRY_FORMAT_DETAIL));
}
+u8 *
+format_ip6_fib_table_memory (u8 * s, va_list * args)
+{
+ s = format(s, "%=30s %=6d %=8ld\n",
+ "IPv6 unicast",
+ pool_elts(ip6_main.fibs),
+ mheap_bytes(ip6_main.ip6_table[IP6_FIB_TABLE_NON_FWDING].ip6_hash.mheap) +
+ mheap_bytes(ip6_main.ip6_table[IP6_FIB_TABLE_FWDING].ip6_hash.mheap));
+
+ return (s);
+}
+
typedef struct {
u32 fib_index;
u64 count_by_prefix_length[129];