FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
bier_bift_table.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __BIER_BIFT_TABLE_H__
17 #define __BIER_BIFT_TABLE_H__
18 
19 #include <vnet/dpo/dpo.h>
20 #include <vnet/bier/bier_types.h>
21 #include <vnet/mpls/packet.h>
22 
23 /*
24  * the lookup table used to get from a BIFT_ID to a load-balance.
25  * As per-draft draft-ietf-bier-mpls-encapsulation-10 this is the
26  * use case for non-MPLS networks
27  */
28 #define BIER_BIFT_N_ENTRIES (1 << 20)
29 typedef struct bier_bfit_table_t_
30 {
31  /**
32  * Forwarding information for each BIFT ID
33  */
35 
36  /**
37  * The number of entries in the table
38  */
41 
42 
44  const dpo_id_t *dpo);
45 
47 
48 /**
49  * Global BIFT table
50  */
52 
53 static inline const dpo_id_t*
55 {
56  return (&bier_bift_table->bblt_dpos[vnet_mpls_uc_get_label(key_host_order)]);
57 }
58 #endif
bier_bfit_table_t * bier_bift_table
Global BIFT table.
unsigned int u32
Definition: types.h:88
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:170
static const dpo_id_t * bier_bift_dp_lookup(bier_bift_id_t key_host_order)
static u32 vnet_mpls_uc_get_label(mpls_label_t label_exp_s_ttl)
Definition: packet.h:105
#define BIER_BIFT_N_ENTRIES
u32 bier_bift_id_t
The BIER universal &#39;label&#39;.
Definition: bier_types.h:458
void bier_bift_table_entry_remove(bier_bift_id_t id)
void bier_bift_table_entry_add(bier_bift_id_t id, const dpo_id_t *dpo)
dpo_id_t bblt_dpos[BIER_BIFT_N_ENTRIES]
Forwarding information for each BIFT ID.
struct bier_bfit_table_t_ bier_bfit_table_t
u32 bblt_n_entries
The number of entries in the table.