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

Function setup_one_vchan

dpdk/app/test/test_dmadev_api.c:294–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294static int
295setup_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
315static int
316test_dma_start_stop(void)

Callers 4

test_dma_start_stopFunction · 0.85
test_dma_statsFunction · 0.85
test_dma_completedFunction · 0.85

Calls 3

rte_dma_info_getFunction · 0.85
rte_dma_configureFunction · 0.85
rte_dma_vchan_setupFunction · 0.85

Tested by

no test coverage detected