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

Function rte_bitmap_scan

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

* Bitmap scan (with automatic wrap-around) * * @param bmp * Handle to bitmap instance * @param pos * When function call returns 1, pos contains the position of the next set * bit, otherwise not modified * @param 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,

Source from the content-addressed store, hash-verified

564 * 0 if there is no bit set in the bitmap, 1 otherwise
565 */
566static inline int
567rte_bitmap_scan(struct rte_bitmap *bmp, uint32_t *pos, uint64_t *slab)
568{
569 /* Return data from current array2 line if available */
570 if (__rte_bitmap_scan_read(bmp, pos, slab)) {
571 return 1;
572 }
573
574 /* Look for non-empty array2 line */
575 if (__rte_bitmap_scan_search(bmp)) {
576 __rte_bitmap_scan_read_init(bmp);
577 __rte_bitmap_scan_read(bmp, pos, slab);
578 return 1;
579 }
580
581 /* Empty bitmap */
582 return 0;
583}
584
585#ifdef __cplusplus
586}

Callers 15

grinder_next_pipeFunction · 0.85
pdcp_cnt_report_fillFunction · 0.85
cpfl_fxp_mod_idx_allocFunction · 0.85
mlx5_ipool_mallocFunction · 0.85
bitmap_ffsFunction · 0.85
member_vlan_filter_setFunction · 0.85
hn_chim_allocFunction · 0.85
ice_acl_alloc_slot_idFunction · 0.85

Calls 3

__rte_bitmap_scan_readFunction · 0.85
__rte_bitmap_scan_searchFunction · 0.85

Tested by 3

test_bitmap_slab_set_getFunction · 0.68
test_bitmap_all_setFunction · 0.68