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

Function fsl_qdma_prep_status_queue

dpdk/drivers/dma/dpaa/dpaa_qdma.c:339–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339static struct
340fsl_qdma_queue *fsl_qdma_prep_status_queue(void)
341{
342 struct fsl_qdma_queue *status_head;
343 unsigned int status_size;
344
345 status_size = QDMA_STATUS_SIZE;
346 if (status_size > FSL_QDMA_CIRCULAR_DESC_SIZE_MAX ||
347 status_size < FSL_QDMA_CIRCULAR_DESC_SIZE_MIN) {
348 DPAA_QDMA_ERR("Get wrong status_size.");
349 return NULL;
350 }
351
352 status_head = rte_zmalloc("qdma: status head", sizeof(*status_head), 0);
353 if (!status_head)
354 return NULL;
355
356 /*
357 * Buffer for queue command
358 */
359 status_head->cq = dma_pool_alloc(sizeof(struct fsl_qdma_format) *
360 status_size,
361 sizeof(struct fsl_qdma_format) *
362 status_size,
363 &status_head->bus_addr);
364
365 if (!status_head->cq) {
366 rte_free(status_head);
367 return NULL;
368 }
369
370 memset(status_head->cq, 0x0, status_size *
371 sizeof(struct fsl_qdma_format));
372 status_head->n_cq = status_size;
373 status_head->virt_head = status_head->cq;
374
375 return status_head;
376}
377
378static int
379fsl_qdma_halt(struct fsl_qdma_engine *fsl_qdma)

Callers 1

dpaa_qdma_initFunction · 0.85

Calls 4

rte_zmallocFunction · 0.85
rte_freeFunction · 0.85
memsetFunction · 0.85
dma_pool_allocFunction · 0.70

Tested by

no test coverage detected