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

Function rte_dma_completed

dpdk/lib/dmadev/rte_dmadev.h:993–1024  ·  view source on GitHub ↗

* Return the number of operations that have been successfully completed. * Once an operation has been reported as completed, the results of that * operation will be visible to all cores on the system. * * @param dev_id * The identifier of the device. * @param vchan * The identifier of virtual DMA channel. * @param nb_cpls * The maximum number of completed operations that can be proc

Source from the content-addressed store, hash-verified

991 * must be less than or equal to the value of nb_cpls.
992 */
993static inline uint16_t
994rte_dma_completed(int16_t dev_id, uint16_t vchan, const uint16_t nb_cpls,
995 uint16_t *last_idx, bool *has_error)
996{
997 struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];
998 uint16_t idx;
999 bool err;
1000
1001#ifdef RTE_DMADEV_DEBUG
1002 if (!rte_dma_is_valid(dev_id) || nb_cpls == 0)
1003 return 0;
1004 if (*obj->completed == NULL)
1005 return 0;
1006#endif
1007
1008 /* Ensure the pointer values are non-null to simplify drivers.
1009 * In most cases these should be compile time evaluated, since this is
1010 * an inline function.
1011 * - If NULL is explicitly passed as parameter, then compiler knows the
1012 * value is NULL
1013 * - If address of local variable is passed as parameter, then compiler
1014 * can know it's non-NULL.
1015 */
1016 if (last_idx == NULL)
1017 last_idx = &idx;
1018 if (has_error == NULL)
1019 has_error = &err;
1020
1021 *has_error = false;
1022 return (*obj->completed)(obj->dev_private, vchan, nb_cpls, last_idx,
1023 has_error);
1024}
1025
1026/**
1027 * Return the number of operations that have been completed, and the operations

Callers 15

edma_adapter_deq_runFunction · 0.85
do_dma_submit_and_pollFunction · 0.85
do_dma_mem_copyFunction · 0.85
test_dma_completedFunction · 0.85
do_multi_copiesFunction · 0.85
test_single_copyFunction · 0.85
test_enqueue_copiesFunction · 0.85
test_multi_failureFunction · 0.85

Calls 1

rte_dma_is_validFunction · 0.85

Tested by 11

test_dma_completedFunction · 0.68
do_multi_copiesFunction · 0.68
test_single_copyFunction · 0.68
test_enqueue_copiesFunction · 0.68
test_multi_failureFunction · 0.68
test_enqueue_fillFunction · 0.68
test_burst_capacityFunction · 0.68
test_m2d_auto_freeFunction · 0.68