Lines Matching refs:bmp
17 test_bitmap_scan_operations(struct rte_bitmap *bmp) in test_bitmap_scan_operations() argument
25 rte_bitmap_reset(bmp); in test_bitmap_scan_operations()
27 rte_bitmap_set_slab(bmp, pos, slab1_magic); in test_bitmap_scan_operations()
28 rte_bitmap_set_slab(bmp, pos + RTE_BITMAP_SLAB_BIT_SIZE, slab2_magic); in test_bitmap_scan_operations()
30 if (!rte_bitmap_scan(bmp, &pos, &out_slab)) { in test_bitmap_scan_operations()
40 if (!rte_bitmap_scan(bmp, &pos, &out_slab)) { in test_bitmap_scan_operations()
51 if (!rte_bitmap_scan(bmp, &pos, &out_slab)) { in test_bitmap_scan_operations()
62 __rte_bitmap_scan_init(bmp); in test_bitmap_scan_operations()
64 if (!rte_bitmap_scan(bmp, &pos, &out_slab)) { in test_bitmap_scan_operations()
75 rte_bitmap_reset(bmp); in test_bitmap_scan_operations()
77 rte_bitmap_set(bmp, i); in test_bitmap_scan_operations()
81 rte_bitmap_clear(bmp, i); in test_bitmap_scan_operations()
84 __rte_bitmap_scan_init(bmp); in test_bitmap_scan_operations()
86 if (rte_bitmap_scan(bmp, &pos, &out_slab) != 1) { in test_bitmap_scan_operations()
95 if (!rte_bitmap_scan(bmp, &pos, &out_slab)) in test_bitmap_scan_operations()
109 test_bitmap_slab_set_get(struct rte_bitmap *bmp) in test_bitmap_slab_set_get() argument
115 rte_bitmap_reset(bmp); in test_bitmap_slab_set_get()
116 rte_bitmap_set_slab(bmp, pos, slab_magic); in test_bitmap_slab_set_get()
118 if (!rte_bitmap_scan(bmp, &pos, &out_slab)) { in test_bitmap_slab_set_get()
134 test_bitmap_set_get_clear(struct rte_bitmap *bmp) in test_bitmap_set_get_clear() argument
139 rte_bitmap_reset(bmp); in test_bitmap_set_get_clear()
141 rte_bitmap_set(bmp, i); in test_bitmap_set_get_clear()
144 if (!rte_bitmap_get(bmp, i)) { in test_bitmap_set_get_clear()
151 rte_bitmap_clear(bmp, i); in test_bitmap_set_get_clear()
154 if (rte_bitmap_get(bmp, i)) { in test_bitmap_set_get_clear()
160 rte_bitmap_reset(bmp); in test_bitmap_set_get_clear()
165 rte_bitmap_set(bmp, i); in test_bitmap_set_get_clear()
169 val = rte_bitmap_get(bmp, i); in test_bitmap_set_get_clear()
185 struct rte_bitmap *bmp; in test_bitmap_all_clear() local
196 bmp = rte_bitmap_init(MAX_BITS, mem, bmp_size); in test_bitmap_all_clear()
197 if (bmp == NULL) { in test_bitmap_all_clear()
202 if (test_bitmap_set_get_clear(bmp) < 0) in test_bitmap_all_clear()
205 if (test_bitmap_slab_set_get(bmp) < 0) in test_bitmap_all_clear()
208 if (test_bitmap_scan_operations(bmp) < 0) in test_bitmap_all_clear()
211 rte_bitmap_free(bmp); in test_bitmap_all_clear()
225 struct rte_bitmap *bmp; in test_bitmap_all_set() local
236 bmp = rte_bitmap_init_with_all_set(MAX_BITS, mem, bmp_size); in test_bitmap_all_set()
237 if (bmp == NULL) { in test_bitmap_all_set()
244 if (!rte_bitmap_scan(bmp, &pos, &slab)) { in test_bitmap_all_set()
249 rte_bitmap_clear(bmp, pos); in test_bitmap_all_set()
252 if (rte_bitmap_scan(bmp, &pos, &slab)) { in test_bitmap_all_set()
257 rte_bitmap_free(bmp); in test_bitmap_all_set()