X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fbier%2Fbier_test.c;h=d4d1692643c287c79ccc9d42471e1b06e8f0ffc2;hb=756cd9441752fc8f84104c9ee19099506ba89f85;hp=f0e7b0cab2f6ca72b874dc95c03f92abf5479a6e;hpb=93149bb4cd0a137b2a6da4b0d9f8cb2032e44734;p=vpp.git diff --git a/src/vnet/bier/bier_test.c b/src/vnet/bier/bier_test.c index f0e7b0cab2f..d4d1692643c 100644 --- a/src/vnet/bier/bier_test.c +++ b/src/vnet/bier/bier_test.c @@ -43,16 +43,17 @@ static int bier_test_do_debug; if (!(_evald)) { \ fformat(stderr, "FAIL:%d: " _comment "\n", \ __LINE__, ##_args); \ + res = 1; \ } else { \ if (bier_test_do_debug) \ fformat(stderr, "PASS:%d: " _comment "\n", \ __LINE__, ##_args); \ } \ - _evald; \ + res; \ }) #define BIER_TEST(_cond, _comment, _args...) \ { \ - if (!BIER_TEST_I(_cond, _comment, ##_args)) { \ + if (BIER_TEST_I(_cond, _comment, ##_args)) { \ return 1; \ ASSERT(!("FAIL: " _comment)); \ } \ @@ -103,8 +104,10 @@ bier_test_mk_intf (u32 ninterfaces) clib_error_t * error = NULL; test_main_t *tm = &test_main; u8 byte; + int res; u32 i; + res = 0; ASSERT(ninterfaces <= ARRAY_LEN(tm->hw_if_indicies)); for (i=0; i<6; i++) @@ -146,19 +149,19 @@ bier_test_mk_intf (u32 ninterfaces) tm->hw_if_indicies[i]); } - return (0); + return (res); } #define BIER_TEST_LB(_cond, _comment, _args...) \ { \ - if (!BIER_TEST_I(_cond, _comment, ##_args)) { \ - return (0); \ + if (BIER_TEST_I(_cond, _comment, ##_args)) { \ + return (1); \ } \ } static int bier_test_validate_entry (index_t bei, - u16 n_buckets, + int n_buckets, ...) { dpo_id_t dpo = DPO_INVALID; @@ -168,17 +171,20 @@ bier_test_validate_entry (index_t bei, va_start(ap, n_buckets); + res = 0; bier_entry_contribute_forwarding(bei, &dpo); - BIER_TEST_LB((DPO_LOAD_BALANCE == dpo.dpoi_type), - "Entry links to %U", - format_dpo_type, dpo.dpoi_type); + res = BIER_TEST_I((DPO_LOAD_BALANCE == dpo.dpoi_type), + "Entry links to %U", + format_dpo_type, dpo.dpoi_type); - lb = load_balance_get(dpo.dpoi_index); - res = fib_test_validate_lb_v(lb, n_buckets, &ap); + if (!res) + { + lb = load_balance_get(dpo.dpoi_index); + res = fib_test_validate_lb_v(lb, n_buckets, &ap); + } dpo_reset(&dpo); - va_end(ap); return (res); @@ -191,7 +197,9 @@ bier_test_mpls_spf (void) u32 mpls_fib_index; test_main_t *tm; int lb_count; + int res; + res = 0; lb_count = pool_elts(load_balance_pool); tm = &test_main; #define N_BIER_ECMP_TABLES 16 @@ -243,24 +251,24 @@ bier_test_mpls_spf (void) BIER_TEST(FIB_NODE_INDEX_INVALID == lfei, "1600/0 is not present"); lfei = fib_table_lookup(mpls_fib_index, &pfx_1600_eos); - BIER_TEST(fib_test_validate_entry(lfei, FIB_FORW_CHAIN_TYPE_MPLS_EOS, - 16, - &l_o_bt[0], - &l_o_bt[1], - &l_o_bt[2], - &l_o_bt[3], - &l_o_bt[4], - &l_o_bt[5], - &l_o_bt[6], - &l_o_bt[7], - &l_o_bt[8], - &l_o_bt[9], - &l_o_bt[10], - &l_o_bt[11], - &l_o_bt[12], - &l_o_bt[13], - &l_o_bt[14], - &l_o_bt[15]), + BIER_TEST(!fib_test_validate_entry(lfei, FIB_FORW_CHAIN_TYPE_MPLS_EOS, + 16, + &l_o_bt[0], + &l_o_bt[1], + &l_o_bt[2], + &l_o_bt[3], + &l_o_bt[4], + &l_o_bt[5], + &l_o_bt[6], + &l_o_bt[7], + &l_o_bt[8], + &l_o_bt[9], + &l_o_bt[10], + &l_o_bt[11], + &l_o_bt[12], + &l_o_bt[13], + &l_o_bt[14], + &l_o_bt[15]), "1600/1 LB stacks on BIER table %d", bti); /* @@ -280,24 +288,24 @@ bier_test_mpls_spf (void) BIER_TEST(FIB_NODE_INDEX_INVALID == lfei, "1600/1 is deleted"); lfei = fib_table_lookup(mpls_fib_index, &pfx_1601_eos); - BIER_TEST(fib_test_validate_entry(lfei, FIB_FORW_CHAIN_TYPE_MPLS_EOS, - 16, - &l_o_bt[0], - &l_o_bt[1], - &l_o_bt[2], - &l_o_bt[3], - &l_o_bt[4], - &l_o_bt[5], - &l_o_bt[6], - &l_o_bt[7], - &l_o_bt[8], - &l_o_bt[9], - &l_o_bt[10], - &l_o_bt[11], - &l_o_bt[12], - &l_o_bt[13], - &l_o_bt[14], - &l_o_bt[15]), + BIER_TEST(!fib_test_validate_entry(lfei, FIB_FORW_CHAIN_TYPE_MPLS_EOS, + 16, + &l_o_bt[0], + &l_o_bt[1], + &l_o_bt[2], + &l_o_bt[3], + &l_o_bt[4], + &l_o_bt[5], + &l_o_bt[6], + &l_o_bt[7], + &l_o_bt[8], + &l_o_bt[9], + &l_o_bt[10], + &l_o_bt[11], + &l_o_bt[12], + &l_o_bt[13], + &l_o_bt[14], + &l_o_bt[15]), "1601/1 LB stacks on BIER table %d", bti); /* @@ -308,26 +316,26 @@ bier_test_mpls_spf (void) .as_u32 = clib_host_to_net_u32(0x01010101), }, }; - fib_route_path_t *paths_1_1_1_1 = NULL; + 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_flags = FIB_ROUTE_PATH_BIER_FMASK, + .frp_sw_if_index = ~0, + }; + fib_mpls_label_t fml_500 = { + .fml_value = 500, }; - vec_add1(path_1_1_1_1.frp_label_stack, 500); + vec_add1(path_1_1_1_1.frp_label_stack, fml_500); vec_add1(paths_1_1_1_1, path_1_1_1_1); const fib_prefix_t pfx_1_1_1_1_s_32 = { .fp_addr = nh_1_1_1_1, .fp_len = 32, .fp_proto = FIB_PROTOCOL_IP4, }; - const bier_fmask_id_t bfm_id_1_1_1_1 = { - .bfmi_hdr_type = BIER_HDR_O_MPLS, - .bfmi_nh = nh_1_1_1_1, - }; index_t bei_1; - bier_table_route_add(&bt_0_0_0_256, 1, paths_1_1_1_1); + input_paths_1_1_1_1 = vec_dup(paths_1_1_1_1); + bier_table_route_add(&bt_0_0_0_256, 1, input_paths_1_1_1_1); bei_1 = bier_table_lookup(bier_table_get(bti), 1); BIER_TEST((INDEX_INVALID != bei_1), "BP:1 present"); @@ -345,20 +353,12 @@ bier_test_mpls_spf (void) FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS, &neos_dpo_1_1_1_1); - bfmi_1_1_1_1 = bier_fmask_db_find(bti, &bfm_id_1_1_1_1); + bfmi_1_1_1_1 = bier_fmask_db_find(bti, &path_1_1_1_1); bfm_1_1_1_1 = bier_fmask_get(bfmi_1_1_1_1); - BIER_TEST(!dpo_cmp(&neos_dpo_1_1_1_1, &bfm_1_1_1_1->bfm_dpo), - "Fmask via 1.1.1.1 stacks on neos from 1.1.1.1/32"); - - /* - * and that n-eos LB at this stage is a drop.. - */ - const fib_test_lb_bucket_t bucket_drop = { - .type = FT_LB_DROP, - }; - BIER_TEST(fib_test_validate_lb(&neos_dpo_1_1_1_1, 1, &bucket_drop), - "1.1.1.1/32 n-eos LB 1 buckets via: DROP"); + BIER_TEST(!dpo_cmp(drop_dpo_get(DPO_PROTO_MPLS), + &bfm_1_1_1_1->bfm_dpo), + "Fmask via 1.1.1.1 stacks on MPLS drop"); /* * The BIER entry should stack on the forwarding chain of the fmask @@ -369,8 +369,11 @@ bier_test_mpls_spf (void) .fmask = bfmi_1_1_1_1, }, }; - BIER_TEST(bier_test_validate_entry(bei_1, 1, &bucket_drop), - "BP:1 stacks on bier drop"); + dpo_id_t dpo_bei = DPO_INVALID; + bier_entry_contribute_forwarding(bei_1, &dpo_bei); + + BIER_TEST(!dpo_cmp(&dpo_bei, drop_dpo_get(DPO_PROTO_BIER)), + "BP:1 stacks on bier drop"); /* * give 1.1.1.1/32 a path and hence a interesting n-eos chain @@ -395,8 +398,10 @@ bier_test_mpls_spf (void) .ttl = 255, }, }; - mpls_label_t *out_lbl_99 = NULL; - vec_add1(out_lbl_99, 99); + fib_mpls_label_t *out_lbl_99 = NULL, fml_99 = { + .fml_value = 99, + }; + vec_add1(out_lbl_99, fml_99); fei = fib_table_entry_update_one_path(0, &pfx_1_1_1_1_s_32, @@ -412,13 +417,14 @@ bier_test_mpls_spf (void) fib_entry_contribute_forwarding(fei, FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS, &neos_dpo_1_1_1_1); - BIER_TEST(fib_test_validate_lb(&neos_dpo_1_1_1_1, 1, - &bucket_neos_99_via_10_10_10_1), + BIER_TEST(!fib_test_validate_lb(&neos_dpo_1_1_1_1, 1, + &bucket_neos_99_via_10_10_10_1), "1.1.1.1/32 n-eos LB 1 buckets via: 99 + 10.10.10.1"); BIER_TEST(!dpo_cmp(&neos_dpo_1_1_1_1, &bfm_1_1_1_1->bfm_dpo), "Fmask via 1.1.1.1 stacks on updated non-eos of 1.1.1.1/32"); - BIER_TEST(bier_test_validate_entry(bei_1, 1, &dpo_o_bfm_1_1_1_1), + bier_entry_contribute_forwarding(bei_1, &dpo_bei); + BIER_TEST((dpo_bei.dpoi_index == bfmi_1_1_1_1), "BP:1 stacks on fmask 1.1.1.1"); /* @@ -448,8 +454,10 @@ bier_test_mpls_spf (void) .ttl = 255, }, }; - mpls_label_t *out_lbl_100 = NULL; - vec_add1(out_lbl_100, 100); + fib_mpls_label_t *out_lbl_100 = NULL, fml_100 = { + .fml_value = 100, + }; + vec_add1(out_lbl_100, fml_100); fei = fib_table_entry_path_add(0, &pfx_1_1_1_1_s_32, @@ -466,9 +474,9 @@ bier_test_mpls_spf (void) fib_entry_contribute_forwarding(fei, FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS, &neos_dpo_1_1_1_1); - BIER_TEST(fib_test_validate_lb(&neos_dpo_1_1_1_1, 2, - &bucket_neos_99_via_10_10_10_1, - &bucket_neos_100_via_10_10_10_2), + BIER_TEST(!fib_test_validate_lb(&neos_dpo_1_1_1_1, 2, + &bucket_neos_99_via_10_10_10_1, + &bucket_neos_100_via_10_10_10_2), "1.1.1.1/32 n-eos LB 2 buckets " "via: 99 + 10.10.10.1, " "via: 100 + 10.10.10.2"); @@ -483,11 +491,13 @@ bier_test_mpls_spf (void) */ index_t bei_2; - bier_table_route_add(&bt_0_0_0_256, 2, paths_1_1_1_1); + input_paths_1_1_1_1 = vec_dup(paths_1_1_1_1); + bier_table_route_add(&bt_0_0_0_256, 2, input_paths_1_1_1_1); bei_2 = bier_table_lookup(bier_table_get(bti), 2); - BIER_TEST(bier_test_validate_entry(bei_2, 1, &dpo_o_bfm_1_1_1_1), - "BP:2 stacks on fmask 1.1.1.1"); + bier_entry_contribute_forwarding(bei_2, &dpo_bei); + BIER_TEST((dpo_bei.dpoi_index == bfmi_1_1_1_1), + "BP:2 stacks on fmask 1.1.1.1"); /* * now add a bit-position via a different next hop and expect to @@ -503,21 +513,23 @@ bier_test_mpls_spf (void) .fp_len = 32, .fp_proto = FIB_PROTOCOL_IP4, }; - fib_route_path_t *paths_1_1_1_2 = NULL, path_1_1_1_2 = { + 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_flags = FIB_ROUTE_PATH_BIER_FMASK, + .frp_sw_if_index = ~0, }; - vec_add1(path_1_1_1_2.frp_label_stack, 501); - vec_add1(paths_1_1_1_2, path_1_1_1_2); - const bier_fmask_id_t bfm_id_1_1_1_2 = { - .bfmi_hdr_type = BIER_HDR_O_MPLS, - .bfmi_nh = nh_1_1_1_2, + fib_mpls_label_t fml_501 = { + .fml_value = 501, }; + vec_add1(path_1_1_1_2.frp_label_stack, fml_501); + vec_add1(paths_1_1_1_2, path_1_1_1_2); + input_paths_1_1_1_2 = vec_dup(paths_1_1_1_2); index_t bei_3; - mpls_label_t *out_lbl_101 = NULL; - vec_add1(out_lbl_101, 101); + fib_mpls_label_t *out_lbl_101 = NULL, fml_101 = { + .fml_value = 101, + }; + vec_add1(out_lbl_101, fml_101); fei = fib_table_entry_path_add(0, &pfx_1_1_1_2_s_32, FIB_SOURCE_API, @@ -529,7 +541,7 @@ bier_test_mpls_spf (void) 1, out_lbl_101, FIB_ROUTE_PATH_FLAG_NONE); - bier_table_route_add(&bt_0_0_0_256, 3, paths_1_1_1_2); + bier_table_route_add(&bt_0_0_0_256, 3, input_paths_1_1_1_2); bei_3 = bier_table_lookup(bier_table_get(bti), 3); BIER_TEST((INDEX_INVALID != bei_3), "BP:3 present"); @@ -547,7 +559,7 @@ bier_test_mpls_spf (void) FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS, &neos_dpo_1_1_1_2); - bfmi_1_1_1_2 = bier_fmask_db_find(bti, &bfm_id_1_1_1_2); + bfmi_1_1_1_2 = bier_fmask_db_find(bti, &path_1_1_1_2); bfm_1_1_1_2 = bier_fmask_get(bfmi_1_1_1_2); BIER_TEST(!dpo_cmp(&neos_dpo_1_1_1_2, @@ -563,17 +575,20 @@ bier_test_mpls_spf (void) .fmask = bfmi_1_1_1_2, }, }; - BIER_TEST(bier_test_validate_entry(bei_3, 1, &dpo_o_bfm_1_1_1_2), - "BP:3 stacks on fmask 1.1.1.2"); + bier_entry_contribute_forwarding(bei_3, &dpo_bei); + BIER_TEST((dpo_bei.dpoi_index == bfmi_1_1_1_2), + "BP:2 stacks on fmask 1.1.1.2"); /* * Load-balance BP:3 over both next-hops */ - bier_table_route_add(&bt_0_0_0_256, 3, paths_1_1_1_1); + paths_1_1_1_1[0] = path_1_1_1_1; + input_paths_1_1_1_1 = vec_dup(paths_1_1_1_1); + bier_table_route_add(&bt_0_0_0_256, 3, input_paths_1_1_1_1); - BIER_TEST(bier_test_validate_entry(bei_3, 2, - &dpo_o_bfm_1_1_1_1, - &dpo_o_bfm_1_1_1_2), + BIER_TEST(!bier_test_validate_entry(bei_3, 2, + &dpo_o_bfm_1_1_1_1, + &dpo_o_bfm_1_1_1_2), "BP:3 stacks on fmask 1.1.1.2 & 1.1.1.1"); /* @@ -589,13 +604,13 @@ bier_test_mpls_spf (void) /* * Withdraw one of the via FIB and thus bring down the fmask - * expect the bier0entry forwarding to remove this from the set + * expect the bier-entry forwarding to remove this from the set */ fib_table_entry_delete(0, &pfx_1_1_1_2_s_32, FIB_SOURCE_API); - BIER_TEST(bier_test_validate_entry(bei_3, 1, - &dpo_o_bfm_1_1_1_1), - "BP:3 post 1.1.1.2 removal stacks on fmask 1.1.1.1"); + bier_entry_contribute_forwarding(bei_3, &dpo_bei); + BIER_TEST((dpo_bei.dpoi_index == bfmi_1_1_1_1), + "BP:3 stacks on fmask 1.1.1.1"); BIER_TEST((bier_table_fwd_lookup(bier_table_get(l_o_bt[0].bier.table), 3) == bfmi_1_1_1_1), @@ -608,7 +623,7 @@ bier_test_mpls_spf (void) * add the via back */ out_lbl_101 = NULL; - vec_add1(out_lbl_101, 101); + vec_add1(out_lbl_101, fml_101); fei = fib_table_entry_path_add(0, &pfx_1_1_1_2_s_32, FIB_SOURCE_API, @@ -623,9 +638,9 @@ bier_test_mpls_spf (void) /* suspend so the update walk kicks int */ vlib_process_suspend(vlib_get_main(), 1e-5); - BIER_TEST(bier_test_validate_entry(bei_3, 2, - &dpo_o_bfm_1_1_1_1, - &dpo_o_bfm_1_1_1_2), + BIER_TEST(!bier_test_validate_entry(bei_3, 2, + &dpo_o_bfm_1_1_1_1, + &dpo_o_bfm_1_1_1_2), "BP:3 stacks on fmask 1.1.1.2 & 1.1.1.1"); BIER_TEST((bier_table_fwd_lookup(bier_table_get(l_o_bt[0].bier.table), 3) == bfmi_1_1_1_1), @@ -637,10 +652,12 @@ bier_test_mpls_spf (void) /* * remove the original 1.1.1.2 fmask from BP:3 */ - bier_table_route_remove(&bt_0_0_0_256, 3, paths_1_1_1_2); - BIER_TEST(bier_test_validate_entry(bei_3, 1, - &dpo_o_bfm_1_1_1_1), + input_paths_1_1_1_2 = vec_dup(paths_1_1_1_2); + bier_table_route_remove(&bt_0_0_0_256, 3, input_paths_1_1_1_2); + bier_entry_contribute_forwarding(bei_3, &dpo_bei); + BIER_TEST((dpo_bei.dpoi_index == bfmi_1_1_1_1), "BP:3 stacks on fmask 1.1.1.1"); + /* * test that the ECMP choices for BP:3 have been updated */ @@ -654,11 +671,14 @@ bier_test_mpls_spf (void) /* * remove the routes added */ - bier_table_route_remove(&bt_0_0_0_256, 2, paths_1_1_1_1); - bier_table_route_remove(&bt_0_0_0_256, 3, paths_1_1_1_2); - bier_table_route_remove(&bt_0_0_0_256, 3, paths_1_1_1_1); - bier_table_route_remove(&bt_0_0_0_256, 1, paths_1_1_1_1); - + input_paths_1_1_1_1 = vec_dup(paths_1_1_1_1); + bier_table_route_remove(&bt_0_0_0_256, 2, input_paths_1_1_1_1); + input_paths_1_1_1_2 = vec_dup(paths_1_1_1_2); + bier_table_route_remove(&bt_0_0_0_256, 3, input_paths_1_1_1_2); + input_paths_1_1_1_1 = vec_dup(paths_1_1_1_1); + bier_table_route_remove(&bt_0_0_0_256, 3, input_paths_1_1_1_1); + input_paths_1_1_1_1 = vec_dup(paths_1_1_1_1); + bier_table_route_remove(&bt_0_0_0_256, 1, input_paths_1_1_1_1); /* * delete the table @@ -668,6 +688,7 @@ bier_test_mpls_spf (void) /* * test resources are freed */ + dpo_reset(&dpo_bei); for (ii = 0; ii < N_BIER_ECMP_TABLES; ii++) { bier_table_ecmp_unlock(l_o_bt[ii].bier.table); @@ -691,6 +712,8 @@ bier_test_mpls_spf (void) vec_free(paths_1_1_1_1); vec_free(paths_1_1_1_2); + vec_free(input_paths_1_1_1_1); + vec_free(input_paths_1_1_1_2); return (0); } @@ -699,9 +722,7 @@ static int bier_test_mpls_imp (void) { fib_node_index_t bii; - /* test_main_t *tm; */ - - /* tm = &test_main; */ + int res; /* * Add the BIER Main table @@ -723,6 +744,7 @@ bier_test_mpls_imp (void) u8 buckets[BIER_HDR_BUCKETS_256]; memset(buckets, 0x5, BIER_HDR_BUCKETS_256); + res = 0; bier_bit_string_init(&bbs_256, BIER_HDR_LEN_256, buckets); bii = bier_imp_add_or_lock(&bt_0_0_0_256, 1, &bbs_256); @@ -769,10 +791,6 @@ bier_test_mpls_imp (void) static int bier_test_mpls_disp (void) { - /* test_main_t *tm; */ - - /* tm = &test_main; */ - /* * Add the BIER Main table */ @@ -784,7 +802,9 @@ bier_test_mpls_disp (void) .bti_ecmp = BIER_ECMP_TABLE_ID_MAIN, }; index_t bti; + int res; + res = 0; bti = bier_table_add_or_lock(&bt_0_0_0_256, 1600); /* @@ -801,8 +821,9 @@ bier_test_mpls_disp (void) */ 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_flags = FIB_ROUTE_PATH_BIER_FMASK, + .frp_sw_if_index = ~0, }; vec_add1(paths_via_disp, path_via_disp); @@ -811,16 +832,13 @@ bier_test_mpls_disp (void) /* * the fmask should stack on the BIER disp table */ - const bier_fmask_id_t bfm_id_0_0_0_0 = { - .bfmi_hdr_type = BIER_HDR_O_MPLS, - }; bier_fmask_t *bfm_0_0_0_0; index_t bfmi_0_0_0_0; dpo_id_t dpo_disp_tbl_1 = DPO_INVALID; bier_disp_table_contribute_forwarding(bdti1, &dpo_disp_tbl_1); - bfmi_0_0_0_0 = bier_fmask_db_find(bti, &bfm_id_0_0_0_0); + bfmi_0_0_0_0 = bier_fmask_db_find(bti, &path_via_disp); bfm_0_0_0_0 = bier_fmask_get(bfmi_0_0_0_0); BIER_TEST(!dpo_cmp(&dpo_disp_tbl_1, &bfm_0_0_0_0->bfm_dpo), @@ -842,21 +860,13 @@ bier_test_mpls_disp (void) BIER_HDR_PROTO_IPV4, rpaths); /* which should stack on a lookup in the mfib table */ - const dpo_id_t *dpo_disp_entry_lb; const dpo_id_t *dpo_disp_entry_v4; bier_disp_entry_t *bde_99; index_t bdei; bdei = bier_disp_table_lookup(bdti1, clib_host_to_net_u16(src)); bde_99 = bier_disp_entry_get(bdei); - dpo_disp_entry_lb = &bde_99->bde_fwd[BIER_HDR_PROTO_IPV4].bde_dpo; - - BIER_TEST(dpo_disp_entry_lb->dpoi_type == DPO_LOAD_BALANCE, - "BIER Disp entry stacks on LB"); - - load_balance_t *lb; - lb = load_balance_get(dpo_disp_entry_lb->dpoi_index); - dpo_disp_entry_v4 = load_balance_get_bucket_i(lb, 0); + dpo_disp_entry_v4 = &bde_99->bde_fwd[BIER_HDR_PROTO_IPV4].bde_dpo; lookup_dpo_t *lkd = lookup_dpo_get(dpo_disp_entry_v4->dpoi_index);