FD.io VPP  v19.08.3-2-gbabecb413
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)
 
index_t bier_table_lock (const bier_table_id_t *id)
 
void bier_table_unlock (const bier_table_id_t *id)
 
void bier_table_route_path_add (const bier_table_id_t *bti, bier_bp_t bp, fib_route_path_t *brp)
 
void bier_table_route_path_remove (const bier_table_id_t *bti, bier_bp_t bp, fib_route_path_t *brp)
 
void bier_table_route_path_update (const bier_table_id_t *bti, bier_bp_t bp, fib_route_path_t *brp)
 
void bier_table_route_delete (const bier_table_id_t *bti, bier_bp_t b)
 
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

◆ bier_table_ecmp_walk_fn_t

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 129 of file bier_table.h.

◆ bier_table_t

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 small <4096, the table is a flat array

◆ bier_table_walk_fn_t

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 147 of file bier_table.h.

◆ bier_tables_walk_fn_t

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 139 of file bier_table.h.

Function Documentation

◆ bier_table_add_or_lock()

index_t bier_table_add_or_lock ( const bier_table_id_t id,
mpls_label_t  ll 
)

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_ecmp_create_and_lock()

index_t bier_table_ecmp_create_and_lock ( const bier_table_id_t id)

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_fwd_lookup()

static const index_t bier_table_fwd_lookup ( const bier_table_t bt,
bier_bp_t  bp 
)
inlinestatic

Definition at line 173 of file bier_table.h.

+ Here is the caller graph for this function:

◆ bier_table_get()

static bier_table_t* bier_table_get ( index_t  bti)
inlinestatic

Definition at line 160 of file bier_table.h.

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

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_lookup()

static const index_t bier_table_lookup ( const bier_table_t bt,
bier_bp_t  bp 
)
inlinestatic

Definition at line 166 of file bier_table.h.

+ Here is the caller graph for this function:

◆ bier_table_route_delete()

void bier_table_route_delete ( const bier_table_id_t bti,
bier_bp_t  b 
)

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

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

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

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

◆ bier_table_walk()

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

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_entry()

u8* format_bier_table_entry ( u8 s,
va_list *  args 
)

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:

◆ STATIC_ASSERT()

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

Variable Documentation

◆ 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.