From 9128637ee8f7b0d903551f165a1447d427e8dd19 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Tue, 5 Dec 2017 13:24:04 -0800 Subject: BIER in non-MPLS netowrks as decsribed in section 2.2 ihttps://tools.ietf.org/html/draft-ietf-bier-mpls-encapsulation-10 with BIFT encoding from: https://tools.ietf.org/html/draft-wijnandsxu-bier-non-mpls-bift-encoding-00 changes: 1 - introduce the new BIFT lookup table. BIER tables that have an associated MPLS label are added to the MPLS-FIB. Those that don't are added to the BIER table 2 - BIER routes that have no associated output MPLS label will add a BIFT label. 3 - The BIER FMask has a path-list as a member to resolve via any possible path. Change-Id: I1fd4d9dbd074f0e855c16e9329b81460ebe1efce Signed-off-by: Neale Ranns --- src/vnet/bier/bier_entry.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/vnet/bier/bier_entry.c') diff --git a/src/vnet/bier/bier_entry.c b/src/vnet/bier/bier_entry.c index 88be8125f51..2f8d25008cc 100644 --- a/src/vnet/bier/bier_entry.c +++ b/src/vnet/bier/bier_entry.c @@ -116,18 +116,23 @@ bier_entry_table_ecmp_walk_add_fmask (index_t btei, fib_path_list_contribute_forwarding(be->be_path_list, FIB_FORW_CHAIN_TYPE_BIER, + FIB_PATH_LIST_FWD_FLAG_COLLAPSE, &dpo); /* * select the appropriate bucket from the LB */ - ASSERT(dpo.dpoi_type == DPO_LOAD_BALANCE); - - lb = load_balance_get(dpo.dpoi_index); - - choice = load_balance_get_bucket_i(lb, - btid->bti_ecmp & - (lb->lb_n_buckets_minus_1)); + if (dpo.dpoi_type == DPO_LOAD_BALANCE) + { + lb = load_balance_get(dpo.dpoi_index); + choice = load_balance_get_bucket_i(lb, + btid->bti_ecmp & + (lb->lb_n_buckets_minus_1)); + } + else + { + choice = &dpo; + } if (choice->dpoi_type == DPO_BIER_FMASK) { @@ -293,6 +298,7 @@ bier_entry_contribute_forwarding(index_t bei, fib_path_list_contribute_forwarding(be->be_path_list, FIB_FORW_CHAIN_TYPE_BIER, + FIB_PATH_LIST_FWD_FLAG_COLLAPSE, dpo); } -- cgit 1.2.3-korg