X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip4_mtrie.h;h=87e2b5892ba32e22c412596657731a3c78112d01;hb=6ce954f8e4446472689146024126ba42da182aa9;hp=be262c2c84db6021dab4d6a7a12186a51e1e4e82;hpb=a3af337e06a79f7d1dacf42a319f241c907122fc;p=vpp.git diff --git a/src/vnet/ip/ip4_mtrie.h b/src/vnet/ip/ip4_mtrie.h index be262c2c84d..87e2b5892ba 100644 --- a/src/vnet/ip/ip4_mtrie.h +++ b/src/vnet/ip/ip4_mtrie.h @@ -108,7 +108,7 @@ typedef struct ip4_fib_mtrie_8_ply_t_ i32 n_non_empty_leafs; /** - * The length of the ply's coviering prefix. Also a measure of its depth + * The length of the ply's covering prefix. Also a measure of its depth * If a leaf in a slot has a mask length longer than this then it is * 'non-empty'. Otherwise it is the value of the cover. */ @@ -131,7 +131,7 @@ typedef struct /** * Embed the PLY with the mtrie struct. This means that the Data-plane * 'get me the mtrie' returns the first ply, and not an indirect 'pointer' - * to it. therefore no cachline misses in the data-path. + * to it. therefore no cacheline misses in the data-path. */ ip4_fib_mtrie_16_ply_t root_ply; } ip4_fib_mtrie_t; @@ -147,13 +147,13 @@ void ip4_mtrie_init (ip4_fib_mtrie_t * m); void ip4_mtrie_free (ip4_fib_mtrie_t * m); /** - * @brief Add a route/rntry to the mtrie + * @brief Add a route/entry to the mtrie */ void ip4_fib_mtrie_route_add (ip4_fib_mtrie_t * m, const ip4_address_t * dst_address, u32 dst_address_length, u32 adj_index); /** - * @brief remove a route/rntry to the mtrie + * @brief remove a route/entry to the mtrie */ void ip4_fib_mtrie_route_del (ip4_fib_mtrie_t * m, const ip4_address_t * dst_address, @@ -161,6 +161,11 @@ void ip4_fib_mtrie_route_del (ip4_fib_mtrie_t * m, u32 adj_index, 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 */ @@ -172,7 +177,7 @@ format_function_t format_ip4_fib_mtrie; extern ip4_fib_mtrie_8_ply_t *ip4_ply_pool; /** - * Is the leaf terminal (i.e. an LB index) or non-terminak (i.e. a PLY index) + * Is the leaf terminal (i.e. an LB index) or non-terminal (i.e. a PLY index) */ always_inline u32 ip4_fib_mtrie_leaf_is_terminal (ip4_fib_mtrie_leaf_t n)