| 169 | |
| 170 | |
| 171 | static int |
| 172 | configure_ethdev(uint16_t port_id, uint8_t start, uint8_t en_isr) |
| 173 | { |
| 174 | int q_id; |
| 175 | |
| 176 | if (en_isr) |
| 177 | default_pmd_conf.intr_conf.lsc = 1; |
| 178 | else |
| 179 | default_pmd_conf.intr_conf.lsc = 0; |
| 180 | |
| 181 | TEST_ASSERT_SUCCESS(rte_eth_dev_configure(port_id, test_params->nb_rx_q, |
| 182 | test_params->nb_tx_q, &default_pmd_conf), |
| 183 | "rte_eth_dev_configure for port %d failed", port_id); |
| 184 | |
| 185 | int ret = rte_eth_dev_set_mtu(port_id, 1550); |
| 186 | RTE_TEST_ASSERT(ret == 0 || ret == -ENOTSUP, |
| 187 | "rte_eth_dev_set_mtu for port %d failed", port_id); |
| 188 | |
| 189 | for (q_id = 0; q_id < test_params->nb_rx_q; q_id++) |
| 190 | TEST_ASSERT_SUCCESS(rte_eth_rx_queue_setup(port_id, q_id, RX_RING_SIZE, |
| 191 | rte_eth_dev_socket_id(port_id), &rx_conf_default, |
| 192 | test_params->mbuf_pool) , |
| 193 | "rte_eth_rx_queue_setup for port %d failed", port_id); |
| 194 | |
| 195 | for (q_id = 0; q_id < test_params->nb_tx_q; q_id++) |
| 196 | TEST_ASSERT_SUCCESS(rte_eth_tx_queue_setup(port_id, q_id, TX_RING_SIZE, |
| 197 | rte_eth_dev_socket_id(port_id), &tx_conf_default), |
| 198 | "rte_eth_tx_queue_setup for port %d failed", port_id); |
| 199 | |
| 200 | if (start) |
| 201 | TEST_ASSERT_SUCCESS(rte_eth_dev_start(port_id), |
| 202 | "rte_eth_dev_start for port %d failed", port_id); |
| 203 | |
| 204 | return 0; |
| 205 | } |
| 206 | |
| 207 | static int members_initialized; |
| 208 | static int mac_members_initialized; |
no test coverage detected