|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef SRC_VPPINFRA_RBTREE_H_
17 #define SRC_VPPINFRA_RBTREE_H_
22 #define RBTREE_TNIL_INDEX 0
rb_node_t * rb_tree_search_subtree_custom(rb_tree_t *rt, rb_node_t *x, u32 key, rb_tree_lt_fn ltfn)
static rb_node_t * rb_node(rb_tree_t *rt, rb_node_index_t ri)
#define RBTREE_TNIL_INDEX
rb_node_index_t root
root index
static rb_node_t * rb_node_left(rb_tree_t *rt, rb_node_t *n)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
struct rb_node_ rb_node_t
int(* rb_tree_lt_fn)(u32 a, u32 b)
void rb_tree_del(rb_tree_t *rt, u32 key)
enum rb_tree_color_ rb_node_color_t
rb_node_t * rb_tree_min_subtree(rb_tree_t *rt, rb_node_t *x)
void rb_tree_del_node(rb_tree_t *rt, rb_node_t *z)
rb_node_index_t left
left child index
void rb_tree_del_custom(rb_tree_t *rt, u32 key, rb_tree_lt_fn ltfn)
uword opaque
value stored by node
static rb_node_index_t rb_node_index(rb_tree_t *rt, rb_node_t *n)
rb_node_index_t rb_tree_add_custom(rb_tree_t *rt, u32 key, uword opaque, rb_tree_lt_fn ltfn)
rb_node_t * rb_tree_successor(rb_tree_t *rt, rb_node_t *x)
static rb_node_t * rb_node_parent(rb_tree_t *rt, rb_node_t *n)
rb_node_index_t parent
parent index
Fixed length block allocator. Pools are built from clib vectors and bitmaps. Use pools when repeatedl...
rb_node_index_t rb_tree_add2(rb_tree_t *rt, u32 key, uword opaque)
void rb_tree_init(rb_tree_t *rt)
rb_node_t * rb_tree_max_subtree(rb_tree_t *rt, rb_node_t *x)
rb_node_t * rb_tree_search_subtree(rb_tree_t *rt, rb_node_t *x, u32 key)
rb_node_index_t right
right child index
rb_node_t * rb_tree_predecessor(rb_tree_t *rt, rb_node_t *x)
void rb_tree_free_nodes(rb_tree_t *rt)
vnet_interface_output_runtime_t * rt
rb_node_index_t rb_tree_add(rb_tree_t *rt, u32 key)
rb_node_t * nodes
pool of nodes
static rb_node_t * rb_node_right(rb_tree_t *rt, rb_node_t *n)
int rb_tree_is_init(rb_tree_t *rt)
u32 rb_tree_n_nodes(rb_tree_t *rt)
static u8 rb_node_is_tnil(rb_tree_t *rt, rb_node_t *n)
struct rb_tree_ rb_tree_t