| 20 | static int tx_porta, rx_portb, rxtx_portc, rxtx_portd, rxtx_porte; |
| 21 | |
| 22 | static int |
| 23 | test_ethdev_configure_port(int port) |
| 24 | { |
| 25 | struct rte_eth_conf null_conf; |
| 26 | struct rte_eth_link link; |
| 27 | int ret; |
| 28 | |
| 29 | memset(&null_conf, 0, sizeof(struct rte_eth_conf)); |
| 30 | |
| 31 | if (rte_eth_dev_configure(port, 1, 2, &null_conf) < 0) { |
| 32 | printf("Configure failed for port %d\n", port); |
| 33 | return -1; |
| 34 | } |
| 35 | |
| 36 | /* Test queue release */ |
| 37 | if (rte_eth_dev_configure(port, 1, 1, &null_conf) < 0) { |
| 38 | printf("Configure failed for port %d\n", port); |
| 39 | return -1; |
| 40 | } |
| 41 | |
| 42 | if (rte_eth_tx_queue_setup(port, 0, RING_SIZE, SOCKET0, NULL) < 0) { |
| 43 | printf("TX queue setup failed port %d\n", port); |
| 44 | return -1; |
| 45 | } |
| 46 | |
| 47 | if (rte_eth_rx_queue_setup(port, 0, RING_SIZE, SOCKET0, |
| 48 | NULL, mp) < 0) { |
| 49 | printf("RX queue setup failed port %d\n", port); |
| 50 | return -1; |
| 51 | } |
| 52 | |
| 53 | if (rte_eth_dev_start(port) < 0) { |
| 54 | printf("Error starting port %d\n", port); |
| 55 | return -1; |
| 56 | } |
| 57 | |
| 58 | ret = rte_eth_link_get(port, &link); |
| 59 | if (ret < 0) { |
| 60 | printf("Link get failed for port %u: %s", |
| 61 | port, rte_strerror(-ret)); |
| 62 | return -1; |
| 63 | } |
| 64 | |
| 65 | return 0; |
| 66 | } |
| 67 | |
| 68 | static int |
| 69 | test_send_basic_packets(void) |
no test coverage detected