MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_bitmap_set_slab

Function rte_bitmap_set_slab

dpdk/lib/eal/include/rte_bitmap.h:392–407  ·  view source on GitHub ↗

* Bitmap slab set * * @param bmp * Handle to bitmap instance * @param pos * Bit position identifying the array2 slab * @param slab * Value to be assigned to the 64-bit slab in array2 */

Source from the content-addressed store, hash-verified

390 * Value to be assigned to the 64-bit slab in array2
391 */
392static inline void
393rte_bitmap_set_slab(struct rte_bitmap *bmp, uint32_t pos, uint64_t slab)
394{
395 uint64_t *slab1, *slab2;
396 uint32_t index1, index2, offset1;
397
398 /* Set bits in array2 slab and set bit in array1 slab */
399 index2 = pos >> RTE_BITMAP_SLAB_BIT_SIZE_LOG2;
400 index1 = pos >> (RTE_BITMAP_SLAB_BIT_SIZE_LOG2 + RTE_BITMAP_CL_BIT_SIZE_LOG2);
401 offset1 = (pos >> RTE_BITMAP_CL_BIT_SIZE_LOG2) & RTE_BITMAP_SLAB_BIT_MASK;
402 slab2 = bmp->array2 + index2;
403 slab1 = bmp->array1 + index1;
404
405 *slab2 |= slab;
406 *slab1 |= 1llu << offset1;
407}
408
409#if RTE_BITMAP_CL_SLAB_SIZE == 8
410static inline uint64_t

Callers 2

test_bitmap_slab_set_getFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_bitmap_slab_set_getFunction · 0.68