X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fgeneve%2Fgeneve.c;h=0c551a0545e3a2bd8d886b456041324a1ad9b207;hb=5fb2278cb8badbbfe727acbdcaeda008a7fd2833;hp=8b773c1e009e5c529de4b928e0763cce31528222;hpb=df3ca23f17820389fc625bbc0e7f468fce550aa9;p=vpp.git diff --git a/src/vnet/geneve/geneve.c b/src/vnet/geneve/geneve.c index 8b773c1e009..0c551a0545e 100644 --- a/src/vnet/geneve/geneve.c +++ b/src/vnet/geneve/geneve.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -498,12 +499,11 @@ int vnet_geneve_add_del_tunnel * re-stack accordingly */ vtep_addr_ref (&t->local); - t->fib_entry_index = fib_table_entry_special_add - (t->encap_fib_index, &tun_remote_pfx, FIB_SOURCE_RR, - FIB_ENTRY_FLAG_NONE); - t->sibling_index = fib_entry_child_add - (t->fib_entry_index, FIB_NODE_TYPE_GENEVE_TUNNEL, - t - vxm->tunnels); + t->fib_entry_index = fib_entry_track (t->encap_fib_index, + &tun_remote_pfx, + FIB_NODE_TYPE_GENEVE_TUNNEL, + t - vxm->tunnels, + &t->sibling_index); geneve_tunnel_restack_dpo (t); } else @@ -524,8 +524,9 @@ int vnet_geneve_add_del_tunnel .frp_addr = zero_addr, .frp_sw_if_index = 0xffffffff, .frp_fib_index = ~0, - .frp_weight = 0, + .frp_weight = 1, .frp_flags = FIB_ROUTE_PATH_LOCAL, + .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD, }; const mfib_prefix_t mpfx = { .fp_proto = fp, @@ -539,17 +540,14 @@ int vnet_geneve_add_del_tunnel * - the accepting interface is that from the API */ mfib_table_entry_path_update (t->encap_fib_index, - &mpfx, - MFIB_SOURCE_GENEVE, - &path, MFIB_ITF_FLAG_FORWARD); + &mpfx, MFIB_SOURCE_GENEVE, &path); path.frp_sw_if_index = a->mcast_sw_if_index; path.frp_flags = FIB_ROUTE_PATH_FLAG_NONE; + path.frp_mitf_flags = MFIB_ITF_FLAG_ACCEPT; mfei = mfib_table_entry_path_update (t->encap_fib_index, &mpfx, - MFIB_SOURCE_GENEVE, - &path, - MFIB_ITF_FLAG_ACCEPT); + MFIB_SOURCE_GENEVE, &path); /* * Create the mcast adjacency to send traffic to the group @@ -607,8 +605,7 @@ int vnet_geneve_add_del_tunnel if (!ip46_address_is_multicast (&t->remote)) { vtep_addr_unref (&t->local); - fib_entry_child_remove (t->fib_entry_index, t->sibling_index); - fib_table_entry_delete_index (t->fib_entry_index, FIB_SOURCE_RR); + fib_entry_untrack (t->fib_entry_index, t->sibling_index); } else if (vtep_addr_unref (&t->remote) == 0) { @@ -1105,7 +1102,7 @@ set_ip6_geneve_bypass (vlib_main_t * vm, VLIB_CLI_COMMAND (set_interface_ip6_geneve_bypass_command, static) = { .path = "set interface ip6 geneve-bypass", .function = set_ip6_geneve_bypass, - .short_help = "set interface ip geneve-bypass [del]", + .short_help = "set interface ip6 geneve-bypass [del]", }; /* *INDENT-ON* */