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

Function prepare_m2d_auto_free

dpdk/app/test/test_dmadev.c:889–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

887}
888
889static int
890prepare_m2d_auto_free(int16_t dev_id, uint16_t vchan)
891{
892 const struct rte_dma_vchan_conf qconf = {
893 .direction = RTE_DMA_DIR_MEM_TO_DEV,
894 .nb_desc = TEST_RINGSIZE,
895 .auto_free.m2d.pool = pool,
896 .dst_port.port_type = RTE_DMA_PORT_PCIE,
897 .dst_port.pcie.coreid = 0,
898 };
899
900 /* Stop the device to reconfigure vchan. */
901 if (rte_dma_stop(dev_id) < 0)
902 ERR_RETURN("Error stopping device %u\n", dev_id);
903
904 if (rte_dma_vchan_setup(dev_id, vchan, &qconf) < 0)
905 ERR_RETURN("Error with queue configuration\n");
906
907 if (rte_dma_start(dev_id) != 0)
908 ERR_RETURN("Error with rte_dma_start()\n");
909
910 return 0;
911}
912
913static int
914test_dmadev_instance(int16_t dev_id)

Callers 1

test_dmadev_instanceFunction · 0.85

Calls 3

rte_dma_stopFunction · 0.85
rte_dma_vchan_setupFunction · 0.85
rte_dma_startFunction · 0.85

Tested by

no test coverage detected