|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
17 #ifndef included_slist_h
18 #define included_slist_h
54 if (
elt->n.next0[0] & 1)
58 return elt->n.next0[1];
60 return (
elt->n.next0[0] == (
u32) ~ 0) ?
elt->n.next0[0] :
61 (
elt->n.next0[0] >> 1);
66 return elt->n.nexts[level];
73 u32 old_level0_value[2];
75 if (level < 2 && (
elt->n.next0[0] == 0 ||
elt->n.next0[0] & 1))
86 if (
elt->n.next0[0] & 1)
88 old_level0_value[0] = (
elt->n.next0[0] == (
u32) ~ 0) ?
89 elt->n.next0[0] :
elt->n.next0[0] >> 1;
90 old_level0_value[1] =
elt->n.next0[1];
clib_error_t * clib_slist_init(clib_slist_t *sp, f64 branching_factor, clib_slist_key_compare_function_t compare, format_function_t format_user_element)
format_function_t format_slist
static u32 clib_slist_get_next_at_level(clib_slist_elt_t *elt, int level)
clib_slist_key_compare_function_t * compare
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Fixed length block allocator. Pools are built from clib vectors and bitmaps. Use pools when repeatedl...
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
clib_slist_search_result_t clib_slist_del(clib_slist_t *sp, void *key)
void clib_slist_add(clib_slist_t *sp, void *key, u32 user_pool_index)
u32 clib_slist_search(clib_slist_t *sp, void *key, u32 *ncompares)
static void clib_slist_set_next_at_level(clib_slist_elt_t *elt, u32 index, int level)
format_function_t * format_user_element
word() clib_slist_key_compare_function_t(void *key, u32 elt_pool_index)
clib_slist_search_result_t