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

Function dma_pool_create

dpdk/drivers/net/hinic/base/hinic_pmd_hwdev.c:276–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276struct dma_pool *dma_pool_create(const char *name, void *dev,
277 size_t size, size_t align, size_t boundary)
278{
279 struct pci_pool *pool;
280
281 pool = rte_zmalloc(NULL, sizeof(*pool), HINIC_MEM_ALLOC_ALIGN_MIN);
282 if (!pool)
283 return NULL;
284
285 rte_atomic32_set(&pool->inuse, 0);
286 pool->elem_size = size;
287 pool->align = align;
288 pool->boundary = boundary;
289 pool->hwdev = dev;
290 strncpy(pool->name, name, (sizeof(pool->name) - 1));
291
292 return pool;
293}
294
295void dma_pool_destroy(struct dma_pool *pool)
296{

Callers 1

hinic_cmdqs_initFunction · 0.85

Calls 3

rte_zmallocFunction · 0.85
rte_atomic32_setFunction · 0.85
strncpyFunction · 0.85

Tested by

no test coverage detected