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

Function rte_bitmap_set

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

* Bitmap bit set * * @param bmp * Handle to bitmap instance * @param pos * Bit position */

Source from the content-addressed store, hash-verified

362 * Bit position
363 */
364static inline void
365rte_bitmap_set(struct rte_bitmap *bmp, uint32_t pos)
366{
367 uint64_t *slab1, *slab2;
368 uint32_t index1, index2, offset1, offset2;
369
370 /* Set bit in array2 slab and set bit in array1 slab */
371 index2 = pos >> RTE_BITMAP_SLAB_BIT_SIZE_LOG2;
372 offset2 = pos & RTE_BITMAP_SLAB_BIT_MASK;
373 index1 = pos >> (RTE_BITMAP_SLAB_BIT_SIZE_LOG2 + RTE_BITMAP_CL_BIT_SIZE_LOG2);
374 offset1 = (pos >> RTE_BITMAP_CL_BIT_SIZE_LOG2) & RTE_BITMAP_SLAB_BIT_MASK;
375 slab2 = bmp->array2 + index2;
376 slab1 = bmp->array1 + index1;
377
378 *slab2 |= 1llu << offset2;
379 *slab1 |= 1llu << offset1;
380}
381
382/**
383 * Bitmap slab set

Callers 15

pdcp_cnt_bitmap_setFunction · 0.85
bcmfs_qp_setupFunction · 0.85
bcmfs5_dequeue_qpFunction · 0.85
bcmfs4_dequeue_qpFunction · 0.85
mlx4_mr_create_primaryFunction · 0.85
cpfl_fxp_mod_idx_freeFunction · 0.85
mlx5_ipool_freeFunction · 0.85
bitmap_set_bitFunction · 0.85

Calls

no outgoing calls

Tested by 2