FD.io VPP  v20.09-64-g4f7b92f0a
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)
 
static index_t bier_table_create (const bier_table_id_t *btid, mpls_label_t local_label)
 
index_t bier_table_lock (const bier_table_id_t *btid)
 
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_path_update_i (const bier_table_id_t *btid, bier_bp_t bp, fib_route_path_t *brps, u8 is_replace)
 
void bier_table_route_path_update (const bier_table_id_t *btid, bier_bp_t bp, fib_route_path_t *brps)
 
void bier_table_route_path_add (const bier_table_id_t *btid, bier_bp_t bp, fib_route_path_t *brps)
 
void bier_table_route_delete (const bier_table_id_t *btid, bier_bp_t bp)
 
void bier_table_route_path_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

◆ BIER_N_ECMP_TABLES

#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

◆ bier_table_ecmp_walk_ctx_t

Function Documentation

◆ bier_table_add_or_lock()

index_t bier_table_add_or_lock ( const bier_table_id_t btid,
mpls_label_t  local_label 
)

Definition at line 397 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_contribute_forwarding()

void bier_table_contribute_forwarding ( index_t  bti,
dpo_id_t dpo 
)

Definition at line 728 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_create()

static index_t bier_table_create ( const bier_table_id_t btid,
mpls_label_t  local_label 
)
static

Definition at line 334 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_destroy()

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:

◆ bier_table_dpo_lock()

static void bier_table_dpo_lock ( dpo_id_t dpo)
static

Definition at line 468 of file bier_table.c.

◆ bier_table_dpo_mem_show()

static void bier_table_dpo_mem_show ( void  )
static

Definition at line 478 of file bier_table.c.

+ Here is the call graph for this function:

◆ bier_table_dpo_unlock()

static void bier_table_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 473 of file bier_table.c.

◆ bier_table_ecmp_create_and_lock()

index_t bier_table_ecmp_create_and_lock ( const bier_table_id_t btid)

Definition at line 456 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_ecmp_set_fmask()

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

Definition at line 791 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_ecmp_unlock()

void bier_table_ecmp_unlock ( index_t  bti)

Definition at line 462 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_ecmp_walk()

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

Definition at line 770 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_ecmp_walk_path_list()

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 758 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_find()

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:

◆ bier_table_get_id()

const bier_table_id_t* bier_table_get_id ( index_t  bti)

Definition at line 524 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_get_index()

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:

◆ bier_table_init()

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:

◆ bier_table_insert()

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

Definition at line 534 of file bier_table.c.

+ Here is the caller graph for this function:

◆ bier_table_is_main()

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:

◆ bier_table_lock()

index_t bier_table_lock ( const bier_table_id_t btid)

Definition at line 374 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_lock_i()

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:

◆ bier_table_mk_bift()

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:

◆ bier_table_mk_ecmp()

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:

◆ bier_table_mk_key()

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:

◆ bier_table_mk_lfib()

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:

◆ bier_table_module_init()

static clib_error_t* bier_table_module_init ( vlib_main_t vm)
static

Definition at line 514 of file bier_table.c.

+ Here is the call graph for this function:

◆ bier_table_remove()

static void bier_table_remove ( bier_table_t bt,
bier_bp_t  bp 
)
static

Definition at line 542 of file bier_table.c.

+ Here is the caller graph for this function:

◆ bier_table_rm_bift()

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:

◆ bier_table_rm_lfib()

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:

◆ bier_table_route_delete()

void bier_table_route_delete ( const bier_table_id_t btid,
bier_bp_t  bp 
)

Definition at line 633 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_route_path_add()

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

Definition at line 625 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_route_path_remove()

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

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:

◆ bier_table_route_path_update()

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

Definition at line 618 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_route_path_update_i()

void bier_table_route_path_update_i ( const bier_table_id_t btid,
bier_bp_t  bp,
fib_route_path_t brps,
u8  is_replace 
)

Definition at line 549 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_show_all()

void bier_table_show_all ( vlib_main_t vm,
bier_show_flags_t  flags 
)

Definition at line 901 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_table_unlock()

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:

◆ bier_table_unlock_i()

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:

◆ bier_table_walk()

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

Definition at line 928 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bier_tables_walk()

void bier_tables_walk ( bier_tables_walk_fn_t  fn,
void *  ctx 
)

Definition at line 920 of file bier_table.c.

◆ format_bier_table()

u8* format_bier_table ( u8 s,
va_list *  ap 
)

Definition at line 844 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_bier_table_dpo()

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

Definition at line 486 of file bier_table.c.

+ Here is the call graph for this function:

◆ format_bier_table_entry()

u8* format_bier_table_entry ( u8 s,
va_list *  ap 
)

Definition at line 809 of file bier_table.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ bier_table_dpo_vft

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:473
static void bier_table_dpo_lock(dpo_id_t *dpo)
Definition: bier_table.c:468
static u8 * format_bier_table_dpo(u8 *s, va_list *ap)
Definition: bier_table.c:486
static void bier_table_dpo_mem_show(void)
Definition: bier_table.c:478

Definition at line 496 of file bier_table.c.

◆ bier_table_mpls_nodes

const char* const bier_table_mpls_nodes[]
static
Initial value:
=
{
"bier-input",
NULL
}

Definition at line 503 of file bier_table.c.

◆ bier_table_nodes

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:503

Definition at line 508 of file bier_table.c.

◆ bier_table_pool

bier_table_t* bier_table_pool

Memory pool of all the allocated tables.

Definition at line 32 of file bier_table.c.

◆ bier_tables_by_key

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.