74 return (elt - fib_node_list_elt_pool);
86 return (head - fib_node_list_head_pool);
102 pool_get(fib_node_list_elt_pool, elt);
129 pool_get(fib_node_list_head_pool, head);
147 pool_put(fib_node_list_head_pool, head);
246 pool_put(fib_node_list_elt_pool, elt);
void fib_node_list_elt_remove(u32 sibling)
static fib_node_list_head_t * fib_node_list_head_get(fib_node_list_t fi)
static index_t fib_node_list_head_get_index(fib_node_list_head_t *head)
static index_t fib_node_list_elt_get_index(fib_node_list_elt_t *elt)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
void fib_node_list_memory_show(void)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
void fib_node_list_walk(fib_node_list_t list, fib_node_list_walk_cb_t fn, void *args)
Walk the list of node.
#define pool_len(p)
Number of elements in pool vector.
fib_node_index_t fnp_index
node's index
void fib_node_list_remove(fib_node_list_t list, u32 sibling)
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)
void fib_show_memory_usage(const char *name, u32 in_use_elts, u32 allocd_elts, size_t size_elt)
Show the memory usage for a type.
A representation of one pointer to another node.
fib_node_ptr_t fnle_owner
The owner of this element.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
fib_node_type_t fnp_type
node type
struct fib_node_list_head_t_ fib_node_list_head_t
A list of FIB nodes.
#define pool_put(P, E)
Free an object E in pool P.
u32 fib_node_list_push_back(fib_node_list_t list, int owner_id, fib_node_type_t type, fib_node_index_t index)
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.
int(* fib_node_list_walk_cb_t)(fib_node_ptr_t *owner, void *args)
Callback function invoked during a list walk.
int fib_node_list_advance(u32 sibling)
Advance the sibling one step (toward the tail) in the list.
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 fib_node_list_elt_t * fib_node_list_elt_get(index_t fi)
u32 fnle_next
The next element in the list.
u32 fib_node_index_t
A typedef of a node index.
static fib_node_list_head_t * fib_node_list_head_pool
u32 fnlh_head
The head element.
u32 fib_node_list_get_size(fib_node_list_t list)
fib_node_list_t fib_node_list_create(void)
Create a new node list.
void fib_node_list_destroy(fib_node_list_t *list)
static fib_node_list_elt_t * fib_node_list_elt_pool
Pools of list elements and heads.
int fib_node_list_get_front(fib_node_list_t list, fib_node_ptr_t *ptr)
static void fib_node_list_head_init(fib_node_list_head_t *head)
#define FIB_NODE_INDEX_INVALID
struct fib_node_list_elt_t_ fib_node_list_elt_t
a hetrogeneous w.r.t.
fib_node_list_t fnle_list
The index of the list this element is in.
u32 fnlh_n_elts
Number of elements in the list.
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
u32 fib_node_list_t
A list of FIB nodes.
static void fib_node_list_extract(fib_node_list_head_t *head, fib_node_list_elt_t *elt)
int fib_node_list_elt_get_next(u32 sibling, fib_node_ptr_t *ptr)
u32 fnle_prev
The previous element in the list.
static uword pool_elts(void *v)
Number of active elements in a pool.