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

Function cpfl_alloc_dma_mem_batch

dpdk/drivers/net/cpfl/cpfl_ethdev.c:2475–2493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2473}
2474
2475int
2476cpfl_alloc_dma_mem_batch(struct idpf_dma_mem *orig_dma, struct idpf_dma_mem *dma, uint32_t size,
2477 int batch_size)
2478{
2479 int i;
2480
2481 if (!idpf_alloc_dma_mem(NULL, orig_dma, (uint64_t)size * (1 + batch_size))) {
2482 PMD_INIT_LOG(ERR, "Could not alloc dma memory");
2483 return -ENOMEM;
2484 }
2485
2486 for (i = 0; i < batch_size; i++) {
2487 dma[i].va = (void *)((char *)orig_dma->va + size * (i + 1));
2488 dma[i].pa = orig_dma->pa + size * (i + 1);
2489 dma[i].size = size;
2490 dma[i].zone = NULL;
2491 }
2492 return 0;
2493}
2494
2495static int
2496cpfl_dev_vport_init(struct rte_eth_dev *dev, void *init_params)

Callers 2

cpfl_dev_vport_initFunction · 0.85
cpfl_repr_initFunction · 0.85

Calls 1

idpf_alloc_dma_memFunction · 0.85

Tested by

no test coverage detected