|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
36 if (!CLIB_DEBUG || !
f->enable_validate)
51 if (ni ==
f->min_root)
72 while (
si != si_start);
93 if (n->
parent == ~0 && ni !=
f->min_root)
119 ASSERT (found_first_child);
128 f->validate_serial++;
200 u32 list_has_single_element = prev_ni == ni;
209 p->
first_child = list_has_single_element ? ~0 : next_ni;
220 next->prev_sibling = prev_ni;
227 return list_has_single_element ? ~0 : next_ni;
247 u32 ri, lo_i, hi_i, k;
253 ri =
f->root_list_by_rank[k];
257 f->root_list_by_rank[k] = ni;
261 f->root_list_by_rank[k] = ~0;
266 if (
hi->key <
lo->key)
271 lo =
hi, lo_i = hi_i;
279 if (
lo->first_child == ~0)
282 lo->first_child = hi_i;
301 u32 to_delete_min_ri =
f->min_root;
309 if (
r->first_child != ~0)
318 cni =
c->next_sibling;
319 rni =
r->next_sibling;
323 r->next_sibling = cni;
324 c->next_sibling = rni;
336 u32 ri_last, ri_next,
i, min_ds;
339 ri_last =
r->prev_sibling;
345 ri_next =
r->next_sibling;
356 ni =
f->root_list_by_rank[
i];
359 f->root_list_by_rank[
i] = ~0;
377 return to_delete_min_ri;
456 fheap_node_add_sibling
static u32 fheap_node_remove(fheap_t *f, u32 ni)
static u32 fheap_node_remove_internal(fheap_t *f, u32 ni, u32 invalidate)
vnet_hw_if_output_node_runtime_t * r
#define foreach_fheap_node_sibling(f, ni, first_ni, body)
static void fheap_validate(fheap_t *f)
static void fheap_node_add_sibling(fheap_t *f, u32 ni, u32 ni_to_add)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define vec_foreach_index(var, v)
Iterate over vector indices.
u32 fheap_del_min(fheap_t *f, u32 *min_key)
static u32 fheap_node_remove_and_invalidate(fheap_t *f, u32 ni)
static void fheap_mark_parent(fheap_t *f, u32 pi)
sll srl srl sll sra u16x4 i
static fheap_node_t * fheap_get_root(fheap_t *f)
static void fheap_link_root(fheap_t *f, u32 ni)
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
void fheap_add(fheap_t *f, u32 ni, u32 key)
void fheap_decrease_key(fheap_t *f, u32 ni, u32 new_key)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
void fheap_del(fheap_t *f, u32 ni)
static fheap_node_t * fheap_get_node(fheap_t *f, u32 i)