FD.io VPP  v18.11-rc0-18-g2a3fb1a
Vector Packet Processing
bier_table.c File Reference
+ Include dependency graph for bier_table.c:

Go to the source code of this file.

Data Structures

struct  bier_table_ecmp_walk_ctx_t_
 

Macros

#define BIER_N_ECMP_TABLES   16
 The magic number of BIER ECMP tables to create. More...
 

Typedefs

typedef struct bier_table_ecmp_walk_ctx_t_ bier_table_ecmp_walk_ctx_t
 

Functions

static index_t bier_table_get_index (const bier_table_t *bt)
 
int bier_table_is_main (const bier_table_t *bt)
 
static u32 bier_table_mk_key (const bier_table_id_t *id)
 
static void bier_table_init (bier_table_t *bt, const bier_table_id_t *id, mpls_label_t ll)
 
static void bier_table_rm_bift (bier_table_t *bt)
 
static void bier_table_mk_bift (bier_table_t *bt)
 
static void bier_table_rm_lfib (bier_table_t *bt)
 
static void bier_table_destroy (bier_table_t *bt)
 
static void bier_table_lock_i (bier_table_t *bt)
 
static void bier_table_unlock_i (bier_table_t *bt)
 
void bier_table_unlock (const bier_table_id_t *bti)
 
static void bier_table_mk_lfib (bier_table_t *bt)
 
static bier_table_tbier_table_find (const bier_table_id_t *bti)
 
static bier_table_tbier_table_mk_ecmp (index_t bti)
 
index_t bier_table_add_or_lock (const bier_table_id_t *btid, mpls_label_t local_label)
 
index_t bier_table_ecmp_create_and_lock (const bier_table_id_t *btid)
 
void bier_table_ecmp_unlock (index_t bti)
 
static void bier_table_dpo_lock (dpo_id_t *dpo)
 
static void bier_table_dpo_unlock (dpo_id_t *dpo)
 
static void bier_table_dpo_mem_show (void)
 
static u8format_bier_table_dpo (u8 *s, va_list *ap)
 
static clib_error_tbier_table_module_init (vlib_main_t *vm)
 
const bier_table_id_tbier_table_get_id (index_t bti)
 
static void bier_table_insert (bier_table_t *bt, bier_bp_t bp, index_t bei)
 
static void bier_table_remove (bier_table_t *bt, bier_bp_t bp)
 
void bier_table_route_add (const bier_table_id_t *btid, bier_bp_t bp, fib_route_path_t *brps)
 
void bier_table_route_remove (const bier_table_id_t *btid, bier_bp_t bp, fib_route_path_t *brps)
 
void bier_table_contribute_forwarding (index_t bti, dpo_id_t *dpo)
 
static fib_path_list_walk_rc_t bier_table_ecmp_walk_path_list (fib_node_index_t pl_index, fib_node_index_t path_index, void *arg)
 
void bier_table_ecmp_walk (index_t bti, bier_table_ecmp_walk_fn_t fn, void *ctx)
 
void bier_table_ecmp_set_fmask (index_t bti, bier_bp_t bp, index_t bfmi)
 
u8format_bier_table_entry (u8 *s, va_list *ap)
 
u8format_bier_table (u8 *s, va_list *ap)
 
void bier_table_show_all (vlib_main_t *vm, bier_show_flags_t flags)
 
void bier_tables_walk (bier_tables_walk_fn_t fn, void *ctx)
 
void bier_table_walk (const bier_table_id_t *bti, bier_table_walk_fn_t fn, void *ctx)
 

Variables

bier_table_tbier_table_pool
 Memory pool of all the allocated tables. More...
 
static uwordbier_tables_by_key
 DB store of all BIER tables index by SD/set/hdr-len. More...
 
static const dpo_vft_t bier_table_dpo_vft
 
static const char *const bier_table_mpls_nodes []
 
static const char *const *const bier_table_nodes [DPO_PROTO_NUM]
 

Macro Definition Documentation

#define BIER_N_ECMP_TABLES   16

The magic number of BIER ECMP tables to create.

The load-balance distribution algorithm will use a power of 2 for the number of buckets, which constrains the choice.

Definition at line 44 of file bier_table.c.

Typedef Documentation

Function Documentation

index_t bier_table_add_or_lock ( const bier_table_id_t btid,
mpls_label_t  local_label 
)

Definition at line 333 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_contribute_forwarding ( index_t  bti,
dpo_id_t dpo 
)

Definition at line 628 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void bier_table_destroy ( bier_table_t bt)
static

Definition at line 152 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void bier_table_dpo_lock ( dpo_id_t dpo)
static

Definition at line 432 of file bier_table.c.

static void bier_table_dpo_mem_show ( void  )
static

Definition at line 442 of file bier_table.c.

+ Here is the call graph for this function:

static void bier_table_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 437 of file bier_table.c.

index_t bier_table_ecmp_create_and_lock ( const bier_table_id_t btid)

Definition at line 420 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_ecmp_set_fmask ( index_t  bti,
bier_bp_t  bp,
index_t  bfmi 
)

Definition at line 688 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_ecmp_unlock ( index_t  bti)

Definition at line 426 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_ecmp_walk ( index_t  bti,
bier_table_ecmp_walk_fn_t  fn,
void *  ctx 
)

Definition at line 670 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_path_list_walk_rc_t bier_table_ecmp_walk_path_list ( fib_node_index_t  pl_index,
fib_node_index_t  path_index,
void *  arg 
)
static

Definition at line 658 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bier_table_t* bier_table_find ( const bier_table_id_t bti)
static

Definition at line 274 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const bier_table_id_t* bier_table_get_id ( index_t  bti)

Definition at line 488 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static index_t bier_table_get_index ( const bier_table_t bt)
inlinestatic

Definition at line 47 of file bier_table.c.

+ Here is the caller graph for this function:

static void bier_table_init ( bier_table_t bt,
const bier_table_id_t id,
mpls_label_t  ll 
)
static

Definition at line 80 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void bier_table_insert ( bier_table_t bt,
bier_bp_t  bp,
index_t  bei 
)
static

Definition at line 498 of file bier_table.c.

+ Here is the caller graph for this function:

int bier_table_is_main ( const bier_table_t bt)

Definition at line 53 of file bier_table.c.

+ Here is the caller graph for this function:

static void bier_table_lock_i ( bier_table_t bt)
static

Definition at line 201 of file bier_table.c.

+ Here is the caller graph for this function:

static void bier_table_mk_bift ( bier_table_t bt)
static

Definition at line 121 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bier_table_t* bier_table_mk_ecmp ( index_t  bti)
static

Definition at line 292 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 bier_table_mk_key ( const bier_table_id_t id)
static

Definition at line 63 of file bier_table.c.

+ Here is the caller graph for this function:

static void bier_table_mk_lfib ( bier_table_t bt)
static

Definition at line 233 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* bier_table_module_init ( vlib_main_t vm)
static

Definition at line 478 of file bier_table.c.

+ Here is the call graph for this function:

static void bier_table_remove ( bier_table_t bt,
bier_bp_t  bp 
)
static

Definition at line 506 of file bier_table.c.

+ Here is the caller graph for this function:

static void bier_table_rm_bift ( bier_table_t bt)
static

Definition at line 111 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void bier_table_rm_lfib ( bier_table_t bt)
static

Definition at line 138 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_route_add ( const bier_table_id_t btid,
bier_bp_t  bp,
fib_route_path_t brps 
)

Definition at line 513 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_route_remove ( const bier_table_id_t btid,
bier_bp_t  bp,
fib_route_path_t brps 
)

Definition at line 565 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_show_all ( vlib_main_t vm,
bier_show_flags_t  flags 
)

Definition at line 798 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_unlock ( const bier_table_id_t bti)

Definition at line 218 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void bier_table_unlock_i ( bier_table_t bt)
static

Definition at line 207 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_table_walk ( const bier_table_id_t bti,
bier_table_walk_fn_t  fn,
void *  ctx 
)

Definition at line 825 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bier_tables_walk ( bier_tables_walk_fn_t  fn,
void *  ctx 
)

Definition at line 817 of file bier_table.c.

u8* format_bier_table ( u8 s,
va_list *  ap 
)

Definition at line 741 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_bier_table_dpo ( u8 s,
va_list *  ap 
)
static

Definition at line 450 of file bier_table.c.

+ Here is the call graph for this function:

u8* format_bier_table_entry ( u8 s,
va_list *  ap 
)

Definition at line 706 of file bier_table.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const dpo_vft_t bier_table_dpo_vft
static
Initial value:
= {
.dv_lock = bier_table_dpo_lock,
.dv_unlock = bier_table_dpo_unlock,
.dv_format = format_bier_table_dpo,
.dv_mem_show = bier_table_dpo_mem_show,
}
static void bier_table_dpo_unlock(dpo_id_t *dpo)
Definition: bier_table.c:437
static void bier_table_dpo_lock(dpo_id_t *dpo)
Definition: bier_table.c:432
static u8 * format_bier_table_dpo(u8 *s, va_list *ap)
Definition: bier_table.c:450
static void bier_table_dpo_mem_show(void)
Definition: bier_table.c:442

Definition at line 460 of file bier_table.c.

const char* const bier_table_mpls_nodes[]
static
Initial value:
=
{
"bier-input",
}
#define NULL
Definition: clib.h:55

Definition at line 467 of file bier_table.c.

const char* const* const bier_table_nodes[DPO_PROTO_NUM]
static
Initial value:
=
{
}
static const char *const bier_table_mpls_nodes[]
Definition: bier_table.c:467

Definition at line 472 of file bier_table.c.

bier_table_t* bier_table_pool

Memory pool of all the allocated tables.

Definition at line 32 of file bier_table.c.

uword* bier_tables_by_key
static

DB store of all BIER tables index by SD/set/hdr-len.

Definition at line 37 of file bier_table.c.