* heper function: configure and start test device */
| 19 | * heper function: configure and start test device |
| 20 | */ |
| 21 | int |
| 22 | test_dev_start(uint16_t port, struct rte_mempool *mp) |
| 23 | { |
| 24 | int32_t rc; |
| 25 | struct rte_eth_conf pconf; |
| 26 | |
| 27 | memset(&pconf, 0, sizeof(pconf)); |
| 28 | |
| 29 | rc = rte_eth_dev_configure(port, NUM_QUEUES, NUM_QUEUES, &pconf); |
| 30 | if (rc != 0) |
| 31 | return rc; |
| 32 | |
| 33 | rc = rte_eth_rx_queue_setup(port, 0, RING_SIZE, SOCKET_ID_ANY, |
| 34 | NULL, mp); |
| 35 | if (rc != 0) |
| 36 | return rc; |
| 37 | |
| 38 | rc = rte_eth_tx_queue_setup(port, 0, RING_SIZE, SOCKET_ID_ANY, |
| 39 | NULL); |
| 40 | if (rc != 0) |
| 41 | return rc; |
| 42 | |
| 43 | rc = rte_eth_dev_start(port); |
| 44 | return rc; |
| 45 | } |
| 46 | |
| 47 | /* Sample test to create virtual rings and tx,rx portid from rings */ |
| 48 | int |
no test coverage detected