| 90 | } |
| 91 | |
| 92 | static void |
| 93 | await_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 */ |
| 112 | static int |
no test coverage detected