| 887 | } |
| 888 | |
| 889 | static int |
| 890 | prepare_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 | |
| 913 | static int |
| 914 | test_dmadev_instance(int16_t dev_id) |
no test coverage detected