X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fila%2Fila.c;h=162d417d7729a32c00dcf82525422212d346ed84;hb=587ea45ad84675cb62380c73c6f484cd6fce7934;hp=52c7ea5567d568f3154dd1f9c84d164f2fa3b474;hpb=a9a20e7f69f4a91a4d5267ab5ce14125bdc7d6c6;p=vpp.git diff --git a/src/plugins/ila/ila.c b/src/plugins/ila/ila.c index 52c7ea5567d..162d417d772 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) { @@ -517,8 +522,8 @@ ila_sir2ila (vlib_main_t * vm, ip61->dst_address.as_u64[0] = ila_address1->as_u64[0]; ip61->dst_address.as_u64[1] = ila_address1->as_u64[1]; - vnet_feature_next (vnet_buffer (p0)->sw_if_index[VLIB_RX], &next0, p0); - vnet_feature_next (vnet_buffer (p1)->sw_if_index[VLIB_RX], &next1, p1); + vnet_feature_next (&next0, p0); + vnet_feature_next (&next1, p1); vlib_validate_buffer_enqueue_x2 (vm, node, next_index, to_next, n_left_to_next, pi0, pi1, next0, @@ -569,7 +574,7 @@ ila_sir2ila (vlib_main_t * vm, ip60->dst_address.as_u64[0] = ila_address0->as_u64[0]; ip60->dst_address.as_u64[1] = ila_address0->as_u64[1]; - vnet_feature_next (vnet_buffer (p0)->sw_if_index[VLIB_RX], &next0, p0); + vnet_feature_next (&next0, p0); vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, pi0, next0); @@ -736,8 +741,7 @@ ila_add_del_entry (ila_add_del_entry_args_t * args) fib_table_entry_special_add(0, &next_hop, FIB_SOURCE_RR, - FIB_ENTRY_FLAG_NONE, - ADJ_INDEX_INVALID); + FIB_ENTRY_FLAG_NONE); e->next_hop_child_index = fib_entry_child_add(e->next_hop_fib_entry_index, ila_fib_node_type, @@ -759,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); @@ -795,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 */ @@ -825,6 +829,7 @@ ila_interface (u32 sw_if_index, u8 disable) /* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, + .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; }