diff options
-rw-r--r-- | src/plugins/dhcp/dhcp6_proxy_node.c | 6 | ||||
-rw-r--r-- | src/plugins/geneve/geneve.c | 11 | ||||
-rw-r--r-- | src/plugins/gtpu/gtpu.c | 11 | ||||
-rw-r--r-- | src/plugins/igmp/igmp.c | 21 | ||||
-rw-r--r-- | src/plugins/igmp/igmp_proxy.c | 3 | ||||
-rw-r--r-- | src/plugins/unittest/bier_test.c | 7 | ||||
-rw-r--r-- | src/plugins/unittest/mfib_test.c | 147 | ||||
-rw-r--r-- | src/plugins/vrrp/vrrp.c | 4 | ||||
-rw-r--r-- | src/vnet/ip/ip_api.c | 5 | ||||
-rw-r--r-- | src/vnet/ip/lookup.c | 4 | ||||
-rw-r--r-- | src/vnet/mfib/.clang-format | 2 | ||||
-rw-r--r-- | src/vnet/mfib/ip4_mfib.c | 2 | ||||
-rw-r--r-- | src/vnet/mfib/ip6_mfib.c | 2 | ||||
-rw-r--r-- | src/vnet/mfib/mfib_table.c | 10 | ||||
-rw-r--r-- | src/vnet/mfib/mfib_table.h | 2 | ||||
-rw-r--r-- | src/vnet/vxlan-gbp/vxlan_gbp.c | 13 | ||||
-rw-r--r-- | src/vnet/vxlan-gpe/vxlan_gpe.c | 13 | ||||
-rw-r--r-- | src/vnet/vxlan/vxlan.c | 11 |
18 files changed, 125 insertions, 149 deletions
diff --git a/src/plugins/dhcp/dhcp6_proxy_node.c b/src/plugins/dhcp/dhcp6_proxy_node.c index 1bc22226ff6..11207690969 100644 --- a/src/plugins/dhcp/dhcp6_proxy_node.c +++ b/src/plugins/dhcp/dhcp6_proxy_node.c @@ -927,9 +927,9 @@ dhcp6_proxy_set_server (ip46_address_t * addr, if (dhcp_proxy_server_add (FIB_PROTOCOL_IP6, addr, src_addr, rx_fib_index, server_table_id)) { - mfib_table_entry_path_update (rx_fib_index, - &all_dhcp_servers, - MFIB_SOURCE_DHCP, &path_for_us); + mfib_table_entry_path_update (rx_fib_index, &all_dhcp_servers, + MFIB_SOURCE_DHCP, MFIB_ENTRY_FLAG_NONE, + &path_for_us); /* * Each interface that is enabled in this table, needs to be added * as an accepting interface, but this is not easily doable in VPP. diff --git a/src/plugins/geneve/geneve.c b/src/plugins/geneve/geneve.c index 5bd612257a5..81c96c1c42e 100644 --- a/src/plugins/geneve/geneve.c +++ b/src/plugins/geneve/geneve.c @@ -524,15 +524,16 @@ int vnet_geneve_add_del_tunnel * - the forwarding interface is for-us * - the accepting interface is that from the API */ - mfib_table_entry_path_update (t->encap_fib_index, - &mpfx, MFIB_SOURCE_GENEVE, &path); + mfib_table_entry_path_update (t->encap_fib_index, &mpfx, + MFIB_SOURCE_GENEVE, + MFIB_ENTRY_FLAG_NONE, &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); + mfei = mfib_table_entry_path_update ( + t->encap_fib_index, &mpfx, MFIB_SOURCE_GENEVE, + MFIB_ENTRY_FLAG_NONE, &path); /* * Create the mcast adjacency to send traffic to the group diff --git a/src/plugins/gtpu/gtpu.c b/src/plugins/gtpu/gtpu.c index 960454adf13..67c91dd131a 100644 --- a/src/plugins/gtpu/gtpu.c +++ b/src/plugins/gtpu/gtpu.c @@ -524,15 +524,16 @@ int vnet_gtpu_add_mod_del_tunnel * - the forwarding interface is for-us * - the accepting interface is that from the API */ - mfib_table_entry_path_update (t->encap_fib_index, - &mpfx, MFIB_SOURCE_GTPU, &path); + mfib_table_entry_path_update (t->encap_fib_index, &mpfx, + MFIB_SOURCE_GTPU, + MFIB_ENTRY_FLAG_NONE, &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_GTPU, &path); + mfei = mfib_table_entry_path_update ( + t->encap_fib_index, &mpfx, MFIB_SOURCE_GTPU, + MFIB_ENTRY_FLAG_NONE, &path); /* * Create the mcast adjacency to send traffic to the group diff --git a/src/plugins/igmp/igmp.c b/src/plugins/igmp/igmp.c index 1c686e39cf2..d66a013e3f9 100644 --- a/src/plugins/igmp/igmp.c +++ b/src/plugins/igmp/igmp.c @@ -408,18 +408,19 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode) { /* first config in this FIB */ mfib_table_lock (mfib_index, FIB_PROTOCOL_IP4, MFIB_SOURCE_IGMP); - mfib_table_entry_path_update (mfib_index, - &mpfx_general_query, - MFIB_SOURCE_IGMP, &for_us_path); - mfib_table_entry_path_update (mfib_index, - &mpfx_report, - MFIB_SOURCE_IGMP, &for_us_path); + mfib_table_entry_path_update (mfib_index, &mpfx_general_query, + MFIB_SOURCE_IGMP, + MFIB_ENTRY_FLAG_NONE, &for_us_path); + mfib_table_entry_path_update (mfib_index, &mpfx_report, + MFIB_SOURCE_IGMP, + MFIB_ENTRY_FLAG_NONE, &for_us_path); } - mfib_table_entry_path_update (mfib_index, - &mpfx_general_query, - MFIB_SOURCE_IGMP, &via_itf_path); + mfib_table_entry_path_update (mfib_index, &mpfx_general_query, + MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, + &via_itf_path); mfib_table_entry_path_update (mfib_index, &mpfx_report, - MFIB_SOURCE_IGMP, &via_itf_path); + MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, + &via_itf_path); } } else if (config && !enable) diff --git a/src/plugins/igmp/igmp_proxy.c b/src/plugins/igmp/igmp_proxy.c index 2167740fc8a..6d930ac791b 100644 --- a/src/plugins/igmp/igmp_proxy.c +++ b/src/plugins/igmp/igmp_proxy.c @@ -55,7 +55,8 @@ igmp_proxy_device_mfib_path_add_del (igmp_group_t * group, u8 add) if (add) mfib_table_entry_path_update (mfib_index, &mpfx_group_addr, - MFIB_SOURCE_IGMP, &via_itf_path); + MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, + &via_itf_path); else mfib_table_entry_path_remove (mfib_index, &mpfx_group_addr, MFIB_SOURCE_IGMP, &via_itf_path); diff --git a/src/plugins/unittest/bier_test.c b/src/plugins/unittest/bier_test.c index f1f9e03f461..7f7439d8590 100644 --- a/src/plugins/unittest/bier_test.c +++ b/src/plugins/unittest/bier_test.c @@ -768,10 +768,9 @@ bier_test_mpls_imp (void) .frp_flags = FIB_ROUTE_PATH_BIER_IMP, .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD, }; - mfib_table_entry_path_update(0, // default table - &pfx_1_1_1_1_c_239_1_1_1 , - MFIB_SOURCE_API, - &path_via_bier_imp_1); + mfib_table_entry_path_update (0, // default table + &pfx_1_1_1_1_c_239_1_1_1, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_bier_imp_1); mfib_table_entry_delete(0, &pfx_1_1_1_1_c_239_1_1_1 , MFIB_SOURCE_API); diff --git a/src/plugins/unittest/mfib_test.c b/src/plugins/unittest/mfib_test.c index 0faa20c0934..1fb4361e793 100644 --- a/src/plugins/unittest/mfib_test.c +++ b/src/plugins/unittest/mfib_test.c @@ -405,10 +405,8 @@ mfib_test_i (fib_protocol_t PROTO, .frp_mitf_flags = MFIB_ITF_FLAG_ACCEPT, }; - mfib_table_entry_path_update(fib_index, - pfx_no_forward, - MFIB_SOURCE_API, - &path_via_if0); + mfib_table_entry_path_update (fib_index, pfx_no_forward, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if0); mfei_no_f = mfib_table_lookup_exact_match(fib_index, pfx_no_forward); MFIB_TEST(!mfib_test_entry(mfei_no_f, @@ -456,18 +454,12 @@ mfib_test_i (fib_protocol_t PROTO, /* * An (S,G) with 1 accepting and 3 forwarding paths */ - mfib_table_entry_path_update(fib_index, - pfx_s_g, - MFIB_SOURCE_API, - &path_via_if0); - mfib_table_entry_path_update(fib_index, - pfx_s_g, - MFIB_SOURCE_API, - &path_via_if1); - mfib_table_entry_paths_update(fib_index, - pfx_s_g, - MFIB_SOURCE_API, - two_paths); + mfib_table_entry_path_update (fib_index, pfx_s_g, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if0); + mfib_table_entry_path_update (fib_index, pfx_s_g, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if1); + mfib_table_entry_paths_update (fib_index, pfx_s_g, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, two_paths); mfei_s_g = mfib_table_lookup_exact_match(fib_index, pfx_s_g); @@ -496,14 +488,11 @@ mfib_test_i (fib_protocol_t PROTO, * A (*,G), which the same G as the (S,G). * different paths. test our LPM. */ - mfei_g_1 = mfib_table_entry_path_update(fib_index, - pfx_star_g_1, - MFIB_SOURCE_API, - &path_via_if0); - mfib_table_entry_path_update(fib_index, - pfx_star_g_1, - MFIB_SOURCE_API, - &path_via_if1); + mfei_g_1 = + mfib_table_entry_path_update (fib_index, pfx_star_g_1, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if0); + mfib_table_entry_path_update (fib_index, pfx_star_g_1, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if1); /* * test we find the *,G and S,G via LPM and exact matches @@ -566,14 +555,12 @@ mfib_test_i (fib_protocol_t PROTO, * different paths. test our LPM. */ path_via_if2.frp_mitf_flags = MFIB_ITF_FLAG_ACCEPT; - mfei_g_m = mfib_table_entry_path_update(fib_index, - pfx_star_g_slash_m, - MFIB_SOURCE_API, - &path_via_if2); - mfib_table_entry_path_update(fib_index, - pfx_star_g_slash_m, - MFIB_SOURCE_API, - &path_via_if3); + mfei_g_m = mfib_table_entry_path_update ( + fib_index, pfx_star_g_slash_m, MFIB_SOURCE_API, MFIB_ENTRY_FLAG_NONE, + &path_via_if2); + mfib_table_entry_path_update (fib_index, pfx_star_g_slash_m, + MFIB_SOURCE_API, MFIB_ENTRY_FLAG_NONE, + &path_via_if3); /* * test we find the (*,G/m), (*,G) and (S,G) via LPM and exact matches @@ -647,10 +634,8 @@ mfib_test_i (fib_protocol_t PROTO, .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD, }; - mfei = mfib_table_entry_path_update(fib_index, - pfx_s_g, - MFIB_SOURCE_API, - &path_for_us); + mfei = mfib_table_entry_path_update (fib_index, pfx_s_g, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_for_us); MFIB_TEST(!mfib_test_entry(mfei, MFIB_ENTRY_FLAG_NONE, @@ -684,10 +669,8 @@ mfib_test_i (fib_protocol_t PROTO, * - expect it to be removed from the replication set. */ path_via_if3.frp_mitf_flags = MFIB_ITF_FLAG_ACCEPT; - mfib_table_entry_path_update(fib_index, - pfx_s_g, - MFIB_SOURCE_API, - &path_via_if3); + mfib_table_entry_path_update (fib_index, pfx_s_g, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if3); MFIB_TEST(!mfib_test_entry(mfei, MFIB_ENTRY_FLAG_NONE, @@ -711,10 +694,8 @@ mfib_test_i (fib_protocol_t PROTO, path_via_if3.frp_mitf_flags = (MFIB_ITF_FLAG_FORWARD | MFIB_ITF_FLAG_ACCEPT | MFIB_ITF_FLAG_NEGATE_SIGNAL); - mfib_table_entry_path_update(fib_index, - pfx_s_g, - MFIB_SOURCE_API, - &path_via_if3); + mfib_table_entry_path_update (fib_index, pfx_s_g, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if3); mfei = mfib_table_lookup_exact_match(fib_index, pfx_s_g); @@ -855,10 +836,9 @@ mfib_test_i (fib_protocol_t PROTO, */ path_via_if0.frp_mitf_flags = (MFIB_ITF_FLAG_ACCEPT | MFIB_ITF_FLAG_NEGATE_SIGNAL); - mfei_g_2 = mfib_table_entry_path_update(fib_index, - pfx_star_g_2, - MFIB_SOURCE_API, - &path_via_if0); + mfei_g_2 = + mfib_table_entry_path_update (fib_index, pfx_star_g_2, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if0); MFIB_TEST(!mfib_test_entry(mfei_g_2, MFIB_ENTRY_FLAG_NONE, 0), @@ -883,10 +863,9 @@ mfib_test_i (fib_protocol_t PROTO, */ path_via_if0.frp_mitf_flags = (MFIB_ITF_FLAG_ACCEPT | MFIB_ITF_FLAG_NEGATE_SIGNAL); - mfei_g_3 = mfib_table_entry_path_update(fib_index, - pfx_star_g_3, - MFIB_SOURCE_API, - &path_via_if0); + mfei_g_3 = + mfib_table_entry_path_update (fib_index, pfx_star_g_3, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if0); MFIB_TEST(!mfib_test_entry(mfei_g_3, MFIB_ENTRY_FLAG_NONE, 0), @@ -1065,14 +1044,12 @@ mfib_test_i (fib_protocol_t PROTO, .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD, }; - mfei_g_1 = mfib_table_entry_path_update(fib_index, - pfx_star_g_1, - MFIB_SOURCE_API, - &path_via_nbr1); - mfei_g_1 = mfib_table_entry_path_update(fib_index, - pfx_star_g_1, - MFIB_SOURCE_API, - &path_via_nbr2); + mfei_g_1 = + mfib_table_entry_path_update (fib_index, pfx_star_g_1, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_nbr1); + mfei_g_1 = + mfib_table_entry_path_update (fib_index, pfx_star_g_1, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_nbr2); MFIB_TEST(!mfib_test_entry(mfei_g_1, MFIB_ENTRY_FLAG_NONE, 2, @@ -1231,10 +1208,8 @@ mfib_test_i (fib_protocol_t PROTO, FIB_FORW_CHAIN_TYPE_MPLS_EOS, &mldp_dpo); - mfei = mfib_table_entry_path_update(fib_index, - pfx_s_g, - MFIB_SOURCE_API, - &path_via_mldp); + mfei = mfib_table_entry_path_update (fib_index, pfx_s_g, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_mldp); MFIB_TEST(!mfib_test_entry(mfei, MFIB_ENTRY_FLAG_NONE, @@ -1246,10 +1221,8 @@ mfib_test_i (fib_protocol_t PROTO, /* * add a for-us path. this tests two types of non-attached paths on one entry */ - mfei = mfib_table_entry_path_update(fib_index, - pfx_s_g, - MFIB_SOURCE_API, - &path_for_us); + mfei = mfib_table_entry_path_update (fib_index, pfx_s_g, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_for_us); MFIB_TEST(!mfib_test_entry(mfei, MFIB_ENTRY_FLAG_NONE, 2, @@ -1573,10 +1546,8 @@ mfib_test_rr_i (fib_protocol_t FPROTO, /* * Insert the less specific /28 */ - mfib_table_entry_path_update(fib_index, - pfx_cover, - MFIB_SOURCE_API, - &path_via_if1); + mfib_table_entry_path_update (fib_index, pfx_cover, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if1); mfei_cover = mfib_table_lookup_exact_match(fib_index, pfx_cover); @@ -1600,10 +1571,8 @@ mfib_test_rr_i (fib_protocol_t FPROTO, /* * add another path to the cover */ - mfib_table_entry_path_update(fib_index, - pfx_cover, - MFIB_SOURCE_API, - &path_via_if2); + mfib_table_entry_path_update (fib_index, pfx_cover, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if2); /* * expect the /32 and /28 to be via both boths @@ -1657,10 +1626,8 @@ mfib_test_rr_i (fib_protocol_t FPROTO, /* * add an accepting path to the cover */ - mfib_table_entry_path_update(fib_index, - pfx_cover, - MFIB_SOURCE_API, - &path_via_if0); + mfib_table_entry_path_update (fib_index, pfx_cover, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if0); /* * expect the /32 and /28 to be via both boths @@ -1695,10 +1662,8 @@ mfib_test_rr_i (fib_protocol_t FPROTO, /* * add a for-us path to the cover */ - mfib_table_entry_path_update(fib_index, - pfx_cover, - MFIB_SOURCE_API, - &path_for_us); + mfib_table_entry_path_update (fib_index, pfx_cover, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_for_us); /* * expect the /32 and /28 to be via all three paths @@ -1766,10 +1731,9 @@ mfib_test_rr_i (fib_protocol_t FPROTO, /* * source the /32 with its own path */ - mfei_host1 = mfib_table_entry_path_update(fib_index, - pfx_host1, - MFIB_SOURCE_API, - &path_via_if2); + mfei_host1 = + mfib_table_entry_path_update (fib_index, pfx_host1, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if2); MFIB_TEST(!mfib_test_entry(mfei_host1, MFIB_ENTRY_FLAG_NONE, 1, @@ -1799,10 +1763,9 @@ mfib_test_rr_i (fib_protocol_t FPROTO, /* * add the RR back then remove the path and RR */ - mfei_host1 = mfib_table_entry_path_update(fib_index, - pfx_host1, - MFIB_SOURCE_API, - &path_via_if2); + mfei_host1 = + mfib_table_entry_path_update (fib_index, pfx_host1, MFIB_SOURCE_API, + MFIB_ENTRY_FLAG_NONE, &path_via_if2); MFIB_TEST(!mfib_test_entry(mfei_host1, MFIB_ENTRY_FLAG_NONE, 1, diff --git a/src/plugins/vrrp/vrrp.c b/src/plugins/vrrp/vrrp.c index 5ee011cceb1..2f638624218 100644 --- a/src/plugins/vrrp/vrrp.c +++ b/src/plugins/vrrp/vrrp.c @@ -435,10 +435,10 @@ vrrp_intf_enable_disable_mcast (u8 enable, u32 sw_if_index, u8 is_ipv6) /* If this is the first VR configured, add the local mcast routes */ if (n_vrs == 1) mfib_table_entry_path_update (fib_index, vrrp_prefix, MFIB_SOURCE_API, - &for_us); + MFIB_ENTRY_FLAG_NONE, &for_us); mfib_table_entry_path_update (fib_index, vrrp_prefix, MFIB_SOURCE_API, - &via_itf); + MFIB_ENTRY_FLAG_NONE, &via_itf); intf->mcast_adj_index[! !is_ipv6] = adj_mcast_add_or_lock (proto, link_type, sw_if_index); } diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 79c9dd61e11..e197057d8c5 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -979,9 +979,8 @@ mroute_add_del_handler (u8 is_add, { if (is_add) { - mfib_entry_index = - mfib_table_entry_paths_update (fib_index, prefix, - MFIB_SOURCE_API, rpaths); + mfib_entry_index = mfib_table_entry_paths_update ( + fib_index, prefix, MFIB_SOURCE_API, entry_flags, rpaths); } else { diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c index 2bb667bc65a..b678ce330c3 100644 --- a/src/vnet/ip/lookup.c +++ b/src/vnet/ip/lookup.c @@ -882,8 +882,8 @@ vnet_ip_mroute_cmd (vlib_main_t * vm, mfib_table_entry_path_remove (fib_index, &pfx, MFIB_SOURCE_CLI, rpaths); else - mfib_table_entry_path_update (fib_index, - &pfx, MFIB_SOURCE_CLI, rpaths); + mfib_table_entry_path_update (fib_index, &pfx, MFIB_SOURCE_CLI, + MFIB_ENTRY_FLAG_NONE, rpaths); } if (FIB_PROTOCOL_IP4 == pfx.fp_proto) diff --git a/src/vnet/mfib/.clang-format b/src/vnet/mfib/.clang-format new file mode 100644 index 00000000000..9d159247d51 --- /dev/null +++ b/src/vnet/mfib/.clang-format @@ -0,0 +1,2 @@ +DisableFormat: true +SortIncludes: false diff --git a/src/vnet/mfib/ip4_mfib.c b/src/vnet/mfib/ip4_mfib.c index 206e451e95c..e71b7db7e5f 100644 --- a/src/vnet/mfib/ip4_mfib.c +++ b/src/vnet/mfib/ip4_mfib.c @@ -92,6 +92,7 @@ ip4_create_mfib_with_table_id (u32 table_id, mfib_table_entry_path_update(mfib_table->mft_index, &ip4_specials[ii], MFIB_SOURCE_SPECIAL, + MFIB_ENTRY_FLAG_NONE, &path); } @@ -151,6 +152,7 @@ ip4_mfib_interface_enable_disable (u32 sw_if_index, int is_enable) mfib_table_entry_path_update(mfib_index, &ip4_specials[ii], MFIB_SOURCE_SPECIAL, + MFIB_ENTRY_FLAG_NONE, &path); } else diff --git a/src/vnet/mfib/ip6_mfib.c b/src/vnet/mfib/ip6_mfib.c index de6cbf3d37c..ac0dd8275f3 100644 --- a/src/vnet/mfib/ip6_mfib.c +++ b/src/vnet/mfib/ip6_mfib.c @@ -183,6 +183,7 @@ ip6_create_mfib_with_table_id (u32 table_id, mfib_table_entry_path_update(mfib_table->mft_index, &pfx, MFIB_SOURCE_SPECIAL, + MFIB_ENTRY_FLAG_NONE, &path_for_us); })); @@ -255,6 +256,7 @@ ip6_mfib_interface_enable_disable (u32 sw_if_index, int is_enable) mfib_table_entry_path_update(mfib_index, &pfx, MFIB_SOURCE_SPECIAL, + MFIB_ENTRY_FLAG_NONE, &path); }); } diff --git a/src/vnet/mfib/mfib_table.c b/src/vnet/mfib/mfib_table.c index a6a82774794..bbb9b05674a 100644 --- a/src/vnet/mfib/mfib_table.c +++ b/src/vnet/mfib/mfib_table.c @@ -292,6 +292,7 @@ static fib_node_index_t mfib_table_entry_paths_update_i (u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, + mfib_entry_flags_t entry_flags, const fib_route_path_t *rpaths) { fib_node_index_t mfib_entry_index; @@ -306,7 +307,7 @@ mfib_table_entry_paths_update_i (u32 fib_index, source, prefix, MFIB_RPF_ID_NONE, - MFIB_ENTRY_FLAG_NONE, + entry_flags, INDEX_INVALID); mfib_entry_path_update(mfib_entry_index, source, rpaths); @@ -325,6 +326,7 @@ fib_node_index_t mfib_table_entry_path_update (u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, + mfib_entry_flags_t entry_flags, const fib_route_path_t *rpath) { fib_node_index_t mfib_entry_index; @@ -333,7 +335,8 @@ mfib_table_entry_path_update (u32 fib_index, vec_add1(rpaths, *rpath); mfib_entry_index = mfib_table_entry_paths_update_i(fib_index, prefix, - source, rpaths); + source, entry_flags, + rpaths); vec_free(rpaths); return (mfib_entry_index); @@ -343,10 +346,11 @@ fib_node_index_t mfib_table_entry_paths_update (u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, + mfib_entry_flags_t entry_flags, const fib_route_path_t *rpaths) { return (mfib_table_entry_paths_update_i(fib_index, prefix, - source, rpaths)); + source, entry_flags, rpaths)); } static void diff --git a/src/vnet/mfib/mfib_table.h b/src/vnet/mfib/mfib_table.h index 9a682b53a67..e3441342aaa 100644 --- a/src/vnet/mfib/mfib_table.h +++ b/src/vnet/mfib/mfib_table.h @@ -210,10 +210,12 @@ extern fib_node_index_t mfib_table_entry_update(u32 fib_index, extern fib_node_index_t mfib_table_entry_path_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, + mfib_entry_flags_t entry_flags, const fib_route_path_t *rpath); extern fib_node_index_t mfib_table_entry_paths_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, + mfib_entry_flags_t entry_flags, const fib_route_path_t *rpath); /** diff --git a/src/vnet/vxlan-gbp/vxlan_gbp.c b/src/vnet/vxlan-gbp/vxlan_gbp.c index 1a1d2c2ba08..eb685b8a40c 100644 --- a/src/vnet/vxlan-gbp/vxlan_gbp.c +++ b/src/vnet/vxlan-gbp/vxlan_gbp.c @@ -571,17 +571,16 @@ int vnet_vxlan_gbp_tunnel_add_del * - the forwarding interface is for-us * - the accepting interface is that from the API */ - mfib_table_entry_path_update (t->encap_fib_index, - &mpfx, - MFIB_SOURCE_VXLAN_GBP, &path); + mfib_table_entry_path_update (t->encap_fib_index, &mpfx, + MFIB_SOURCE_VXLAN_GBP, + MFIB_ENTRY_FLAG_NONE, &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_VXLAN_GBP, - &path); + mfei = mfib_table_entry_path_update ( + t->encap_fib_index, &mpfx, MFIB_SOURCE_VXLAN_GBP, + MFIB_ENTRY_FLAG_NONE, &path); /* * Create the mcast adjacency to send traffic to the group diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.c b/src/vnet/vxlan-gpe/vxlan_gpe.c index 17ffcadcd9f..8ef94d44337 100644 --- a/src/vnet/vxlan-gpe/vxlan_gpe.c +++ b/src/vnet/vxlan-gpe/vxlan_gpe.c @@ -645,17 +645,16 @@ int vnet_vxlan_gpe_add_del_tunnel * - the forwarding interface is for-us * - the accepting interface is that from the API */ - mfib_table_entry_path_update (t->encap_fib_index, - &mpfx, - MFIB_SOURCE_VXLAN_GPE, &path); + mfib_table_entry_path_update (t->encap_fib_index, &mpfx, + MFIB_SOURCE_VXLAN_GPE, + MFIB_ENTRY_FLAG_NONE, &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_VXLAN_GPE, - &path); + mfei = mfib_table_entry_path_update ( + t->encap_fib_index, &mpfx, MFIB_SOURCE_VXLAN_GPE, + MFIB_ENTRY_FLAG_NONE, &path); /* * Create the mcast adjacency to send traffic to the group diff --git a/src/vnet/vxlan/vxlan.c b/src/vnet/vxlan/vxlan.c index f62b9252377..8568d5b0a98 100644 --- a/src/vnet/vxlan/vxlan.c +++ b/src/vnet/vxlan/vxlan.c @@ -581,15 +581,16 @@ int vnet_vxlan_add_del_tunnel * - the forwarding interface is for-us * - the accepting interface is that from the API */ - mfib_table_entry_path_update (t->encap_fib_index, - &mpfx, MFIB_SOURCE_VXLAN, &path); + mfib_table_entry_path_update (t->encap_fib_index, &mpfx, + MFIB_SOURCE_VXLAN, + MFIB_ENTRY_FLAG_NONE, &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_VXLAN, &path); + mfei = mfib_table_entry_path_update ( + t->encap_fib_index, &mpfx, MFIB_SOURCE_VXLAN, + MFIB_ENTRY_FLAG_NONE, &path); /* * Create the mcast adjacency to send traffic to the group |