FD.io VPP  v18.04-17-g3a0d853
Vector Packet Processing
bier_table.h File Reference
+ Include dependency graph for bier_table.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bier_table_t_
 A BIER Table is the bit-indexed forwarding table. More...
 

Typedefs

typedef struct bier_table_t_ bier_table_t
 A BIER Table is the bit-indexed forwarding table. More...
 
typedef void(* bier_table_ecmp_walk_fn_t) (index_t btei, void *ctx)
 Types and functions to walk the ECMP tables of a main table. More...
 
typedef void(* bier_tables_walk_fn_t) (const bier_table_t *bt, void *ctx)
 Types and functions to walk all the BIER Tables. More...
 
typedef void(* bier_table_walk_fn_t) (const bier_table_t *bt, const bier_entry_t *be, void *ctx)
 Types and functions to walk all the entries in one BIER Table. More...
 

Functions

 STATIC_ASSERT ((sizeof(bier_table_t)<=2 *CLIB_CACHE_LINE_BYTES),"BIER table fits on 2 cache lines")
 
index_t bier_table_add_or_lock (const bier_table_id_t *id, mpls_label_t ll)
 
void bier_table_unlock (const bier_table_id_t *id)
 
void bier_table_route_add (const bier_table_id_t *bti, bier_bp_t bp, fib_route_path_t *brp)
 
void bier_table_route_remove (const bier_table_id_t *bti, bier_bp_t bp, fib_route_path_t *brp)
 
void bier_table_show_all (vlib_main_t *vm, bier_show_flags_t flags)
 
const bier_table_id_tbier_table_get_id (index_t bti)
 
u8format_bier_table (u8 *s, va_list *args)
 
u8format_bier_table_entry (u8 *s, va_list *args)
 
index_t bier_table_ecmp_create_and_lock (const bier_table_id_t *id)
 
void bier_table_ecmp_unlock (index_t bti)
 
void bier_table_ecmp_set_fmask (index_t bti, bier_bp_t bp, index_t bfmi)
 
void bier_table_contribute_forwarding (index_t bti, dpo_id_t *dpo)
 
void bier_table_ecmp_walk (index_t bti, bier_table_ecmp_walk_fn_t fn, void *ctx)
 
int bier_table_is_main (const bier_table_t *bt)
 
void bier_tables_walk (bier_tables_walk_fn_t fn, void *ctx)
 
void bier_table_walk (const bier_table_id_t *id, bier_table_walk_fn_t fn, void *ctx)
 
static bier_table_tbier_table_get (index_t bti)
 
static const index_t bier_table_lookup (const bier_table_t *bt, bier_bp_t bp)
 
static const index_t bier_table_fwd_lookup (const bier_table_t *bt, bier_bp_t bp)
 

Variables

bier_table_tbier_table_pool
 Memory pool of all the allocated tables. More...
 

Typedef Documentation

typedef void(* bier_table_ecmp_walk_fn_t) (index_t btei, void *ctx)

Types and functions to walk the ECMP tables of a main table.

Definition at line 123 of file bier_table.h.

typedef struct bier_table_t_ bier_table_t

A BIER Table is the bit-indexed forwarding table.

Each entry (bit-position) represents one destination, and its reachability

The number of entries in a table is thus the maximum supported bit-position. Since this is smal <4096, the table is a flat arry

typedef void(* bier_table_walk_fn_t) (const bier_table_t *bt, const bier_entry_t *be, void *ctx)

Types and functions to walk all the entries in one BIER Table.

Definition at line 141 of file bier_table.h.

typedef void(* bier_tables_walk_fn_t) (const bier_table_t *bt, void *ctx)

Types and functions to walk all the BIER Tables.

Definition at line 133 of file bier_table.h.

Function Documentation

index_t bier_table_add_or_lock ( const bier_table_id_t id,
mpls_label_t  ll 
)

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:

index_t bier_table_ecmp_create_and_lock ( const bier_table_id_t id)

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 const index_t bier_table_fwd_lookup ( const bier_table_t bt,
bier_bp_t  bp 
)
inlinestatic

Definition at line 167 of file bier_table.h.

+ Here is the caller graph for this function:

static bier_table_t* bier_table_get ( index_t  bti)
inlinestatic

Definition at line 154 of file bier_table.h.

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

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 const index_t bier_table_lookup ( const bier_table_t bt,
bier_bp_t  bp 
)
inlinestatic

Definition at line 160 of file bier_table.h.

+ Here is the caller graph for this function:

void bier_table_route_add ( const bier_table_id_t bti,
bier_bp_t  bp,
fib_route_path_t brp 
)

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 bti,
bier_bp_t  bp,
fib_route_path_t brp 
)

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 id)

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:

void bier_table_walk ( const bier_table_id_t id,
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 *  args 
)

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:

u8* format_bier_table_entry ( u8 s,
va_list *  args 
)

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:

STATIC_ASSERT ( (sizeof(bier_table_t)<=2 *CLIB_CACHE_LINE_BYTES ,
"BIER table fits on 2 cache lines"   
)

Variable Documentation

bier_table_t* bier_table_pool

Memory pool of all the allocated tables.

Definition at line 32 of file bier_table.c.