X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fila%2Fila.c;h=366abc9831ece97f121148763c8f3763a2bb3f25;hb=b2c31b685fd2cf28436ca32bc93e23eb24c74878;hp=93138723479e8bea0ce8bfc5f091b8915c17ee29;hpb=7d98a12f29d5b9696df98b8af2f128614a4f0360;p=vpp.git diff --git a/src/plugins/ila/ila.c b/src/plugins/ila/ila.c index 93138723479..366abc9831e 100644 --- a/src/plugins/ila/ila.c +++ b/src/plugins/ila/ila.c @@ -68,6 +68,11 @@ static dpo_type_t ila_dpo_type; */ static fib_node_type_t ila_fib_node_type; +/** + * FIB source for adding entries + */ +static fib_source_t ila_fib_src; + u8 * format_half_ip6_address (u8 * s, va_list * va) { @@ -758,7 +763,7 @@ ila_add_del_entry (ila_add_del_entry_args_t * args) fib_table_entry_special_dpo_add(0, &pfx, - FIB_SOURCE_PLUGIN_HI, + ila_fib_src, FIB_ENTRY_FLAG_EXCLUSIVE, &dpo); dpo_reset(&dpo); @@ -794,7 +799,7 @@ ila_add_del_entry (ila_add_del_entry_args_t * args) .fp_proto = FIB_PROTOCOL_IP6, }; - fib_table_entry_special_remove(0, &pfx, FIB_SOURCE_PLUGIN_HI); + fib_table_entry_special_remove(0, &pfx, ila_fib_src); /* * remove this ILA entry as child of the FIB netry for the next-hop */ @@ -824,7 +829,7 @@ ila_interface (u32 sw_if_index, u8 disable) /* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, - .description = "Identifier-locator addressing for IPv6", + .description = "Identifier Locator Addressing (ILA) for IPv6", }; /* *INDENT-ON* */ @@ -935,7 +940,9 @@ ila_init (vlib_main_t * vm) ila_dpo_type = dpo_register_new_type(&ila_vft, ila_nodes); ila_fib_node_type = fib_node_register_new_type(&ila_fib_node_vft); - + ila_fib_src = fib_source_allocate("ila", + FIB_SOURCE_PRIORITY_HI, + FIB_SOURCE_BH_SIMPLE); return NULL; } @@ -1063,10 +1070,10 @@ ila_show_entries_command_fn (vlib_main_t * vm, ila_entry_t *e; vlib_cli_output (vm, " %U\n", format_ila_entry, vnm, NULL); - pool_foreach (e, ilm->entries, - ({ + pool_foreach (e, ilm->entries) + { vlib_cli_output (vm, " %U\n", format_ila_entry, vnm, e); - })); + } return NULL; }