diff options
author | Neale Ranns <nranns@cisco.com> | 2019-12-04 06:11:00 +0000 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-12-04 22:47:12 +0000 |
commit | 3bab8f9c5396a7bf1115b93a9e0691a76a9ed14c (patch) | |
tree | 0212708b47f042ac393848e0471669f837788278 /src/vnet/fib/ip6_fib.c | |
parent | 5f8f6173328f8d77feea5fd100e150c3094c11f0 (diff) |
fib: Decouple source from priority and behaviour
Type: feature
the fib_source_t enum alone no longer defines the priority and
behaviour, instead each source must be allocated these attributes.
This allows the creation of other sources by the plugins (and
soon over the API).
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I890ee820fbc16079ee417ea1fbc163192806e853
Diffstat (limited to 'src/vnet/fib/ip6_fib.c')
-rw-r--r-- | src/vnet/fib/ip6_fib.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c index 991fbc1151b..6d0eca4c8d7 100644 --- a/src/vnet/fib/ip6_fib.c +++ b/src/vnet/fib/ip6_fib.c @@ -151,11 +151,11 @@ ip6_fib_table_destroy (u32 fib_index) fib_table_t *fib_table = fib_table_get(fib_index, FIB_PROTOCOL_IP6); fib_source_t source; - /* + /* * validate no more routes. */ ASSERT(0 == fib_table->ft_total_route_counts); - FOR_EACH_FIB_SOURCE(source) + vec_foreach_index(source, fib_table->ft_src_route_counts) { ASSERT(0 == fib_table->ft_src_route_counts[source]); } @@ -164,6 +164,7 @@ ip6_fib_table_destroy (u32 fib_index) { hash_unset (ip6_main.fib_index_by_table_id, fib_table->ft_table_id); } + vec_free(fib_table->ft_src_route_counts); pool_put_index(ip6_main.v6_fibs, fib_table->ft_index); pool_put(ip6_main.fibs, fib_table); } @@ -688,7 +689,7 @@ ip6_show_fib (vlib_main_t * vm, fib_table->ft_epoch, format_fib_table_flags, fib_table->ft_flags); - FOR_EACH_FIB_SOURCE(source) + vec_foreach_index(source, fib_table->ft_locks) { if (0 != fib_table->ft_locks[source]) { |