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

Function mempool_cache_init

dpdk/lib/mempool/rte_mempool.c:745–756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743}
744
745static void
746mempool_cache_init(struct rte_mempool_cache *cache, uint32_t size)
747{
748 /* Check that cache have enough space for flush threshold */
749 RTE_BUILD_BUG_ON(CALC_CACHE_FLUSHTHRESH(RTE_MEMPOOL_CACHE_MAX_SIZE) >
750 RTE_SIZEOF_FIELD(struct rte_mempool_cache, objs) /
751 RTE_SIZEOF_FIELD(struct rte_mempool_cache, objs[0]));
752
753 cache->size = size;
754 cache->flushthresh = CALC_CACHE_FLUSHTHRESH(size);
755 cache->len = 0;
756}
757
758/*
759 * Create and initialize a cache for objects that are retrieved from and

Callers 2

rte_mempool_cache_createFunction · 0.85
rte_mempool_create_emptyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected