| 2473 | } |
| 2474 | |
| 2475 | int |
| 2476 | cpfl_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 | |
| 2495 | static int |
| 2496 | cpfl_dev_vport_init(struct rte_eth_dev *dev, void *init_params) |
no test coverage detected