staticuint32_trte_bitmap_get_memory_footprint(uint32_tn_bits)[inline],[static]
Bitmap memory footprint calculation
Parametersn_bits Number of bits in the bitmap
Returns
Bitmap memory footprint measured in bytes on success, 0 on error
Definition at line 148 of file rte_bitmap.h.
staticstructrte_bitmap*rte_bitmap_init(uint32_tn_bits,uint8_t*mem,uint32_tmem_size)[inline],[static]
Bitmap initialization
Parametersn_bits Number of pre-allocated bits in array2.
mem Base address of array1 and array2.
mem_size Minimum expected size of bitmap.
Returns
Handle to bitmap instance.
Definition at line 170 of file rte_bitmap.h.
staticvoid__rte_bitmap_clear_slab_overhead_bits(uint64_t*slabs,uint32_tslab_size,uint32_tpos)[inline],[static]
Bitmap clear slab overhead bits.
Parametersslabs Slab array.
slab_size Number of 64-bit slabs in the slabs array.
pos The start bit position in the slabs to be cleared.
Definition at line 216 of file rte_bitmap.h.
staticstructrte_bitmap*rte_bitmap_init_with_all_set(uint32_tn_bits,uint8_t*mem,uint32_tmem_size)[inline],[static]
Bitmap initialization with all bits set
Parametersn_bits Number of pre-allocated bits in array2.
mem Base address of array1 and array2.
mem_size Minimum expected size of bitmap.
Returns
Handle to bitmap instance.
Definition at line 246 of file rte_bitmap.h.
staticintrte_bitmap_free(structrte_bitmap*bmp)[inline],[static]
Bitmap free
Parametersbmp Handle to bitmap instance
Returns
0 upon success, error code otherwise
Definition at line 291 of file rte_bitmap.h.
staticvoidrte_bitmap_reset(structrte_bitmap*bmp)[inline],[static]
Bitmap reset
Parametersbmp Handle to bitmap instance
Definition at line 308 of file rte_bitmap.h.
staticvoidrte_bitmap_prefetch0(structrte_bitmap*bmp,uint32_tpos)[inline],[static]
Bitmap location prefetch into CPU L1 cache
Parametersbmp Handle to bitmap instance
pos Bit position
Definition at line 324 of file rte_bitmap.h.
staticuint64_trte_bitmap_get(structrte_bitmap*bmp,uint32_tpos)[inline],[static]
Bitmap bit get
Parametersbmp Handle to bitmap instance
pos Bit position
Returns
0 when bit is cleared, non-zero when bit is set
Definition at line 345 of file rte_bitmap.h.
staticvoidrte_bitmap_set(structrte_bitmap*bmp,uint32_tpos)[inline],[static]
Bitmap bit set
Parametersbmp Handle to bitmap instance
pos Bit position
Definition at line 365 of file rte_bitmap.h.
staticvoidrte_bitmap_set_slab(structrte_bitmap*bmp,uint32_tpos,uint64_tslab)[inline],[static]
Bitmap slab set
Parametersbmp Handle to bitmap instance
pos Bit position identifying the array2 slab
slab Value to be assigned to the 64-bit slab in array2
Definition at line 393 of file rte_bitmap.h.
staticvoidrte_bitmap_clear(structrte_bitmap*bmp,uint32_tpos)[inline],[static]
Bitmap bit clear
Parametersbmp Handle to bitmap instance
pos Bit position
Definition at line 458 of file rte_bitmap.h.
staticintrte_bitmap_scan(structrte_bitmap*bmp,uint32_t*pos,uint64_t*slab)[inline],[static]
Bitmap scan (with automatic wrap-around)
Parametersbmp Handle to bitmap instance
pos When function call returns 1, pos contains the position of the next set bit, otherwise not
modified
slab When function call returns 1, slab contains the value of the entire 64-bit slab where the bit
indicated by pos is located. Slabs are always 64-bit aligned, so the position of the first bit of the
slab (this bit is not necessarily set) is pos / 64. Once a slab has been returned by the bitmap scan
operation, the internal pointers of the bitmap are updated to point after this slab, so the same slab
will not be returned again if it contains more than one bit which is set. When function call returns
0, slab is not modified.
Returns
0 if there is no bit set in the bitmap, 1 otherwise
Definition at line 567 of file rte_bitmap.h.