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

Function mempool_ops_alloc_once

dpdk/lib/mempool/rte_mempool.c:296–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296static int
297mempool_ops_alloc_once(struct rte_mempool *mp)
298{
299 int ret;
300
301 /* create the internal ring if not already done */
302 if ((mp->flags & RTE_MEMPOOL_F_POOL_CREATED) == 0) {
303 ret = rte_mempool_ops_alloc(mp);
304 if (ret != 0)
305 return ret;
306 mp->flags |= RTE_MEMPOOL_F_POOL_CREATED;
307 }
308 return 0;
309}
310
311/* Add objects in the pool, using a physically contiguous memory
312 * zone. Return the number of objects added, or a negative value

Callers 3

Calls 1

rte_mempool_ops_allocFunction · 0.85

Tested by

no test coverage detected