svm: remove unused fifo functions
[vpp.git] / src / plugins / unittest / bier_test.c
index 087da6f..f1f9e03 100644 (file)
@@ -82,7 +82,7 @@ static u8 * format_test_interface_name (u8 * s, va_list * args)
   return format (s, "test-eth%d", dev_instance);
 }
 
-static uword dummy_interface_tx (vlib_main_t * vm,
+static uword placeholder_interface_tx (vlib_main_t * vm,
                                  vlib_node_runtime_t * node,
                                  vlib_frame_t * frame)
 {
@@ -93,7 +93,7 @@ static uword dummy_interface_tx (vlib_main_t * vm,
 VNET_DEVICE_CLASS (test_interface_device_class,static) = {
   .name = "Test interface",
   .format_device_name = format_test_interface_name,
-  .tx_function = dummy_interface_tx,
+  .tx_function = placeholder_interface_tx,
 };
 
 static u8 *hw_address;
@@ -134,8 +134,6 @@ bier_test_mk_intf (u32 ninterfaces)
 
         tm->hw[i] = vnet_get_hw_interface(vnet_get_main(),
                                           tm->hw_if_indicies[i]);
-        vec_validate (ip4_main.fib_index_by_sw_if_index, tm->hw[i]->sw_if_index);
-        vec_validate (ip6_main.fib_index_by_sw_if_index, tm->hw[i]->sw_if_index);
         ip4_main.fib_index_by_sw_if_index[tm->hw[i]->sw_if_index] = 0;
         ip6_main.fib_index_by_sw_if_index[tm->hw[i]->sw_if_index] = 0;
         error = vnet_sw_interface_set_flags(vnet_get_main(),
@@ -322,7 +320,6 @@ bier_test_mpls_spf (void)
     fib_route_path_t *paths_1_1_1_1 = NULL, *input_paths_1_1_1_1;
     fib_route_path_t path_1_1_1_1 = {
         .frp_addr = nh_1_1_1_1,
-        .frp_bier_fib_index = bti,
         .frp_sw_if_index = ~0,
     };
     fib_mpls_label_t fml_500 = {
@@ -518,7 +515,6 @@ bier_test_mpls_spf (void)
     };
     fib_route_path_t *paths_1_1_1_2 = NULL, *input_paths_1_1_1_2, path_1_1_1_2 = {
         .frp_addr = nh_1_1_1_2,
-        .frp_bier_fib_index = bti,
         .frp_sw_if_index = ~0,
     };
     fib_mpls_label_t fml_501 = {
@@ -770,12 +766,12 @@ bier_test_mpls_imp (void)
         .frp_bier_imp = bii,
         .frp_weight = 0,
         .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_ITF_FLAG_FORWARD);
+                                 &path_via_bier_imp_1);
     mfib_table_entry_delete(0,
                             &pfx_1_1_1_1_c_239_1_1_1 ,
                             MFIB_SOURCE_API);
@@ -811,7 +807,7 @@ bier_test_mpls_disp (void)
     bti = bier_table_add_or_lock(&bt_0_0_0_256, 1600);
 
     /*
-     * Add a BIER dispoition table
+     * Add a BIER disposition table
      */
     const u32 bier_disp_tbl_id = 1;
     index_t bdti1;
@@ -819,13 +815,12 @@ bier_test_mpls_disp (void)
     bdti1 = bier_disp_table_add_or_lock(bier_disp_tbl_id);
 
     /*
-     * add a bit-poistion in the table that resolves via
+     * add a bit-position in the table that resolves via
      * DISP table, i.e. a for-us bit-position
      */
     fib_route_path_t *paths_via_disp = NULL, path_via_disp = {
         // .frp_addr = all-zeros
         .frp_proto = DPO_PROTO_BIER,
-        .frp_bier_fib_index = bdti1,
         .frp_sw_if_index = ~0,
     };
     vec_add1(paths_via_disp, path_via_disp);