| 292 | } |
| 293 | |
| 294 | static int |
| 295 | setup_one_vchan(void) |
| 296 | { |
| 297 | struct rte_dma_vchan_conf vchan_conf = { 0 }; |
| 298 | struct rte_dma_info dev_info = { 0 }; |
| 299 | struct rte_dma_conf dev_conf = { 0 }; |
| 300 | int ret; |
| 301 | |
| 302 | ret = rte_dma_info_get(test_dev_id, &dev_info); |
| 303 | RTE_TEST_ASSERT_SUCCESS(ret, "Failed to obtain device info, %d", ret); |
| 304 | dev_conf.nb_vchans = dev_info.max_vchans; |
| 305 | ret = rte_dma_configure(test_dev_id, &dev_conf); |
| 306 | RTE_TEST_ASSERT_SUCCESS(ret, "Failed to configure, %d", ret); |
| 307 | vchan_conf.direction = RTE_DMA_DIR_MEM_TO_MEM; |
| 308 | vchan_conf.nb_desc = dev_info.min_desc; |
| 309 | ret = rte_dma_vchan_setup(test_dev_id, 0, &vchan_conf); |
| 310 | RTE_TEST_ASSERT_SUCCESS(ret, "Failed to setup vchan, %d", ret); |
| 311 | |
| 312 | return TEST_SUCCESS; |
| 313 | } |
| 314 | |
| 315 | static int |
| 316 | test_dma_start_stop(void) |
no test coverage detected