FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
fib_node_list.c File Reference
+ Include dependency graph for fib_node_list.c:

Go to the source code of this file.

Data Structures

struct  fib_node_list_elt_t_
 a hetrogeneous w.r.t. More...
 
struct  fib_node_list_head_t_
 A list of FIB nodes. More...
 

Typedefs

typedef struct fib_node_list_elt_t_ fib_node_list_elt_t
 a hetrogeneous w.r.t. More...
 
typedef struct fib_node_list_head_t_ fib_node_list_head_t
 A list of FIB nodes. More...
 

Functions

static index_t fib_node_list_elt_get_index (fib_node_list_elt_t *elt)
 
static fib_node_list_elt_tfib_node_list_elt_get (index_t fi)
 
static index_t fib_node_list_head_get_index (fib_node_list_head_t *head)
 
static fib_node_list_head_tfib_node_list_head_get (fib_node_list_t fi)
 
static fib_node_list_elt_tfib_node_list_elt_create (fib_node_list_head_t *head, int id, fib_node_type_t type, fib_node_index_t index)
 
static void fib_node_list_head_init (fib_node_list_head_t *head)
 
fib_node_list_t fib_node_list_create (void)
 Create a new node list. More...
 
void fib_node_list_destroy (fib_node_list_t *list)
 
u32 fib_node_list_push_front (fib_node_list_t list, int owner_id, fib_node_type_t type, fib_node_index_t index)
 Insert an element at the from of the list. More...
 
u32 fib_node_list_push_back (fib_node_list_t list, int owner_id, fib_node_type_t type, fib_node_index_t index)
 
static void fib_node_list_extract (fib_node_list_head_t *head, fib_node_list_elt_t *elt)
 
static void fib_node_list_insert_after (fib_node_list_head_t *head, fib_node_list_elt_t *prev, fib_node_list_elt_t *elt)
 
void fib_node_list_remove (fib_node_list_t list, u32 sibling)
 
void fib_node_list_elt_remove (u32 sibling)
 
int fib_node_list_advance (u32 sibling)
 Advance the sibling one step (toward the tail) in the list. More...
 
int fib_node_list_elt_get_next (u32 sibling, fib_node_ptr_t *ptr)
 
u32 fib_node_list_get_size (fib_node_list_t list)
 
int fib_node_list_get_front (fib_node_list_t list, fib_node_ptr_t *ptr)
 
void fib_node_list_walk (fib_node_list_t list, fib_node_list_walk_cb_t fn, void *args)
 Walk the list of node. More...
 
void fib_node_list_memory_show (void)
 

Variables

static fib_node_list_elt_tfib_node_list_elt_pool
 Pools of list elements and heads. More...
 
static fib_node_list_head_tfib_node_list_head_pool
 

Typedef Documentation

◆ fib_node_list_elt_t

a hetrogeneous w.r.t.

FIB node type, of FIB nodes. Since we cannot use C pointers, due to memeory reallocs, the next/prev are described as key:{type,index}. An element in the list

◆ fib_node_list_head_t

A list of FIB nodes.

Function Documentation

◆ fib_node_list_advance()

int fib_node_list_advance ( u32  sibling)

Advance the sibling one step (toward the tail) in the list.

return 0 if at the end of the list, 1 otherwise.

Definition at line 264 of file fib_node_list.c.

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

◆ fib_node_list_create()

fib_node_list_t fib_node_list_create ( void  )

Create a new node list.

a hetrogeneous w.r.t.

Definition at line 125 of file fib_node_list.c.

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

◆ fib_node_list_destroy()

void fib_node_list_destroy ( fib_node_list_t list)

Definition at line 137 of file fib_node_list.c.

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

◆ fib_node_list_elt_create()

static fib_node_list_elt_t* fib_node_list_elt_create ( fib_node_list_head_t head,
int  id,
fib_node_type_t  type,
fib_node_index_t  index 
)
static

Definition at line 95 of file fib_node_list.c.

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

◆ fib_node_list_elt_get()

static fib_node_list_elt_t* fib_node_list_elt_get ( index_t  fi)
static

Definition at line 78 of file fib_node_list.c.

+ Here is the caller graph for this function:

◆ fib_node_list_elt_get_index()

static index_t fib_node_list_elt_get_index ( fib_node_list_elt_t elt)
static

Definition at line 72 of file fib_node_list.c.

+ Here is the caller graph for this function:

◆ fib_node_list_elt_get_next()

int fib_node_list_elt_get_next ( u32  sibling,
fib_node_ptr_t ptr 
)

Definition at line 291 of file fib_node_list.c.

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

◆ fib_node_list_elt_remove()

void fib_node_list_elt_remove ( u32  sibling)

Definition at line 250 of file fib_node_list.c.

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

◆ fib_node_list_extract()

static void fib_node_list_extract ( fib_node_list_head_t head,
fib_node_list_elt_t elt 
)
static

Definition at line 193 of file fib_node_list.c.

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

◆ fib_node_list_get_front()

int fib_node_list_get_front ( fib_node_list_t  list,
fib_node_ptr_t ptr 
)

Definition at line 328 of file fib_node_list.c.

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

◆ fib_node_list_get_size()

u32 fib_node_list_get_size ( fib_node_list_t  list)

Definition at line 313 of file fib_node_list.c.

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

◆ fib_node_list_head_get()

static fib_node_list_head_t* fib_node_list_head_get ( fib_node_list_t  fi)
static

Definition at line 89 of file fib_node_list.c.

+ Here is the caller graph for this function:

◆ fib_node_list_head_get_index()

static index_t fib_node_list_head_get_index ( fib_node_list_head_t head)
static

Definition at line 84 of file fib_node_list.c.

+ Here is the caller graph for this function:

◆ fib_node_list_head_init()

static void fib_node_list_head_init ( fib_node_list_head_t head)
static

Definition at line 115 of file fib_node_list.c.

+ Here is the caller graph for this function:

◆ fib_node_list_insert_after()

static void fib_node_list_insert_after ( fib_node_list_head_t head,
fib_node_list_elt_t prev,
fib_node_list_elt_t elt 
)
static

Definition at line 217 of file fib_node_list.c.

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

◆ fib_node_list_memory_show()

void fib_node_list_memory_show ( void  )

Definition at line 380 of file fib_node_list.c.

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

◆ fib_node_list_push_back()

u32 fib_node_list_push_back ( fib_node_list_t  list,
int  owner_id,
fib_node_type_t  type,
fib_node_index_t  index 
)

Definition at line 183 of file fib_node_list.c.

◆ fib_node_list_push_front()

u32 fib_node_list_push_front ( fib_node_list_t  list,
int  owner_id,
fib_node_type_t  type,
fib_node_index_t  index 
)

Insert an element at the from of the list.

Definition at line 156 of file fib_node_list.c.

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

◆ fib_node_list_remove()

void fib_node_list_remove ( fib_node_list_t  list,
u32  sibling 
)

Definition at line 234 of file fib_node_list.c.

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

◆ fib_node_list_walk()

void fib_node_list_walk ( fib_node_list_t  list,
fib_node_list_walk_cb_t  fn,
void *  args 
)

Walk the list of node.

This must be safe w.r.t. the removal of nodes during the walk.

Definition at line 354 of file fib_node_list.c.

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

Variable Documentation

◆ fib_node_list_elt_pool

fib_node_list_elt_t* fib_node_list_elt_pool
static

Pools of list elements and heads.

Definition at line 68 of file fib_node_list.c.

◆ fib_node_list_head_pool

fib_node_list_head_t* fib_node_list_head_pool
static

Definition at line 69 of file fib_node_list.c.