summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/ip4_mtrie.c8
-rw-r--r--src/vnet/ip/ip4_mtrie.h5
2 files changed, 10 insertions, 3 deletions
diff --git a/src/vnet/ip/ip4_mtrie.c b/src/vnet/ip/ip4_mtrie.c
index f114da01b77..5b78cbec1ea 100644
--- a/src/vnet/ip/ip4_mtrie.c
+++ b/src/vnet/ip/ip4_mtrie.c
@@ -683,8 +683,8 @@ mtrie_ply_memory_usage (ip4_fib_mtrie_t * m, ip4_fib_mtrie_8_ply_t * p)
}
/* Returns number of bytes of memory used by mtrie. */
-static uword
-mtrie_memory_usage (ip4_fib_mtrie_t * m)
+uword
+ip4_fib_mtrie_memory_usage (ip4_fib_mtrie_t * m)
{
uword bytes, i;
@@ -771,7 +771,9 @@ format_ip4_fib_mtrie (u8 * s, va_list * va)
s = format (s, "%d plies, memory usage %U\n",
pool_elts (ip4_ply_pool),
- format_memory_size, mtrie_memory_usage (m));
+ format_memory_size, ip4_fib_mtrie_memory_usage (m));
+ s = format (s, "root-ply");
+ p = &m->root_ply;
if (verbose)
{
diff --git a/src/vnet/ip/ip4_mtrie.h b/src/vnet/ip/ip4_mtrie.h
index be262c2c84d..34b97dc1a9d 100644
--- a/src/vnet/ip/ip4_mtrie.h
+++ b/src/vnet/ip/ip4_mtrie.h
@@ -162,6 +162,11 @@ void ip4_fib_mtrie_route_del (ip4_fib_mtrie_t * m,
u32 cover_address_length, u32 cover_adj_index);
/**
+ * @brief return the memory used by the table
+ */
+uword ip4_fib_mtrie_memory_usage (ip4_fib_mtrie_t * m);
+
+/**
* @brief Format/display the contents of the mtrie
*/
format_function_t format_ip4_fib_mtrie;