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

Function await_hw

dpdk/app/test/test_dmadev.c:92–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92static void
93await_hw(int16_t dev_id, uint16_t vchan)
94{
95 enum rte_dma_vchan_status st;
96
97 if (rte_dma_vchan_status(dev_id, vchan, &st) < 0) {
98 /* for drivers that don't support this op, just sleep for 1 millisecond */
99 rte_delay_us_sleep(1000);
100 return;
101 }
102
103 /* for those that do, *max* end time is one second from now, but all should be faster */
104 const uint64_t end_cycles = rte_get_timer_cycles() + rte_get_timer_hz();
105 while (st == RTE_DMA_VCHAN_ACTIVE && rte_get_timer_cycles() < end_cycles) {
106 rte_pause();
107 rte_dma_vchan_status(dev_id, vchan, &st);
108 }
109}
110
111/* run a series of copy tests just using some different options for enqueues and completions */
112static int

Callers 9

do_multi_copiesFunction · 0.85
test_single_copyFunction · 0.85
test_enqueue_copiesFunction · 0.85
test_multi_failureFunction · 0.85
test_enqueue_fillFunction · 0.85
test_burst_capacityFunction · 0.85

Calls 3

rte_delay_us_sleepFunction · 0.50
rte_pauseFunction · 0.50

Tested by

no test coverage detected