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

Function mlx5_ipool_get_next_cache

dpdk/drivers/net/mlx5/mlx5_utils.c:771–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771static void *
772mlx5_ipool_get_next_cache(struct mlx5_indexed_pool *pool, uint32_t *pos)
773{
774 struct rte_bitmap *ibmp;
775 uint64_t slab = 0;
776 uint32_t iidx = *pos;
777
778 ibmp = pool->ibmp;
779 if (!ibmp || !rte_bitmap_scan(ibmp, &iidx, &slab)) {
780 if (pool->bmp_mem) {
781 pool->cfg.free(pool->bmp_mem);
782 pool->bmp_mem = NULL;
783 pool->ibmp = NULL;
784 }
785 return NULL;
786 }
787 iidx += rte_ctz64(slab);
788 rte_bitmap_clear(ibmp, iidx);
789 iidx++;
790 *pos = iidx;
791 return mlx5_ipool_get_cache(pool, iidx);
792}
793
794void *
795mlx5_ipool_get_next(struct mlx5_indexed_pool *pool, uint32_t *pos)

Callers 1

mlx5_ipool_get_nextFunction · 0.85

Calls 4

rte_bitmap_scanFunction · 0.85
rte_ctz64Function · 0.85
rte_bitmap_clearFunction · 0.85
mlx5_ipool_get_cacheFunction · 0.85

Tested by

no test coverage detected