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

Function dma_attach_secondary

dpdk/lib/dmadev/rte_dmadev.c:290–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290static struct rte_dma_dev *
291dma_attach_secondary(const char *name)
292{
293 struct rte_dma_dev *dev;
294 int16_t i;
295 int ret;
296
297 ret = dma_data_prepare();
298 if (ret < 0) {
299 RTE_DMA_LOG(ERR, "Cannot initialize dmadevs data");
300 return NULL;
301 }
302
303 for (i = 0; i < dma_devices_max; i++) {
304 if (!strcmp(dma_devices_shared_data->data[i].dev_name, name))
305 break;
306 }
307 if (i == dma_devices_max) {
308 RTE_DMA_LOG(ERR,
309 "Device %s is not driven by the primary process",
310 name);
311 return NULL;
312 }
313
314 dev = &rte_dma_devices[i];
315 dev->data = &dma_devices_shared_data->data[i];
316
317 return dev;
318}
319
320static struct rte_dma_dev *
321dma_allocate(const char *name, int numa_node, size_t private_data_size)

Callers 1

dma_allocateFunction · 0.85

Calls 2

dma_data_prepareFunction · 0.85
strcmpFunction · 0.85

Tested by

no test coverage detected