* 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 */
| 390 | * Value to be assigned to the 64-bit slab in array2 |
| 391 | */ |
| 392 | static inline void |
| 393 | rte_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 |
| 410 | static inline uint64_t |
no outgoing calls