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.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c
index bb092cea1bf..9f58e4b6a9e 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -600,12 +600,20 @@ ip6_fib_table_show_one (ip6_fib_t *fib,
u8 *
format_ip6_fib_table_memory (u8 * s, va_list * args)
{
+ uword bytes_inuse;
+
+ bytes_inuse =
+ ip6_main.ip6_table[IP6_FIB_TABLE_NON_FWDING].ip6_hash.alloc_arena_next
+ - ip6_main.ip6_table[IP6_FIB_TABLE_NON_FWDING].ip6_hash.alloc_arena;
+
+ bytes_inuse +=
+ ip6_main.ip6_table[IP6_FIB_TABLE_FWDING].ip6_hash.alloc_arena_next
+ - ip6_main.ip6_table[IP6_FIB_TABLE_FWDING].ip6_hash.alloc_arena;
+
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));
-
+ bytes_inuse);
return (s);
}