|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
41 _pool_init_fixed (
void **pool_ptr,
u32 elt_size,
u32 max_elts)
68 total_size = vector_size + free_index_size;
72 total_size = (total_size + page_size - 1) & ~(page_size - 1);
76 mmap_base = mmap (0, total_size, PROT_READ | PROT_WRITE,
77 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
79 if (mmap_base == MAP_FAILED)
102 fi = (
u32 *) (vh + 1);
114 for (
i = max_elts;
i < set_bits;
i++)
118 for (
i = 0;
i < max_elts;
i++)
119 fi[
i] = (max_elts - 1) -
i;
#define clib_bitmap_alloc(v, n_bits)
Allocate a bitmap with the supplied number of bits.
#define clib_unix_warning(format, args...)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Fixed length block allocator. Pools are built from clib vectors and bitmaps. Use pools when repeatedl...
sll srl srl sll sra u16x4 i
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap.
#define CLIB_CACHE_LINE_BYTES
#define pool_aligned_header_bytes
Align pool header so that pointers are naturally aligned.
static_always_inline uword clib_mem_get_page_size(void)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static uword vec_header_bytes(uword header_bytes)