diff options
Diffstat (limited to 'src/vnet/fib/mpls_fib.c')
-rw-r--r-- | src/vnet/fib/mpls_fib.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vnet/fib/mpls_fib.c b/src/vnet/fib/mpls_fib.c index 6a9b1ac2989..cc657975d0f 100644 --- a/src/vnet/fib/mpls_fib.c +++ b/src/vnet/fib/mpls_fib.c @@ -44,10 +44,11 @@ * Switching between schemes based on observed/measured action similarity is not * considered on the grounds of complexity and flip-flopping. * - * VPP mantra - favour performance over memory. We choose a 21 bit key. + * VPP mantra - favour performance over memory. We choose a 21 bit key. */ #include <vnet/fib/fib_table.h> +#include <vnet/fib/mpls_fib.h> #include <vnet/dpo/load_balance.h> #include <vnet/dpo/drop_dpo.h> #include <vnet/dpo/punt_dpo.h> @@ -342,6 +343,20 @@ mpls_fib_table_get_flow_hash_config (u32 fib_index) return (0); } +void +mpls_fib_table_walk (mpls_fib_t *mpls_fib, + fib_table_walk_fn_t fn, + void *ctx) +{ + fib_node_index_t lfei; + mpls_label_t key; + + hash_foreach(key, lfei, mpls_fib->mf_entries, + ({ + fn(lfei, ctx); + })); +} + static void mpls_fib_table_show_all (const mpls_fib_t *mpls_fib, vlib_main_t * vm) |