| 117 | RTE_DIM(test_params.member_ports)) |
| 118 | |
| 119 | static int |
| 120 | configure_ethdev(uint16_t port_id, struct rte_eth_conf *eth_conf, |
| 121 | uint8_t start) |
| 122 | { |
| 123 | int rxq, txq; |
| 124 | |
| 125 | TEST_ASSERT(rte_eth_dev_configure(port_id, RXTX_QUEUE_COUNT, |
| 126 | RXTX_QUEUE_COUNT, eth_conf) == 0, "Failed to configure device %u", |
| 127 | port_id); |
| 128 | |
| 129 | int ret = rte_eth_dev_set_mtu(port_id, 1550); |
| 130 | RTE_TEST_ASSERT(ret == 0 || ret == -ENOTSUP, |
| 131 | "rte_eth_dev_set_mtu for port %d failed", port_id); |
| 132 | |
| 133 | for (rxq = 0; rxq < RXTX_QUEUE_COUNT; rxq++) { |
| 134 | TEST_ASSERT(rte_eth_rx_queue_setup(port_id, rxq, RXTX_RING_SIZE, |
| 135 | rte_eth_dev_socket_id(port_id), NULL, |
| 136 | test_params.mbuf_pool) == 0, "Failed to setup rx queue."); |
| 137 | } |
| 138 | |
| 139 | for (txq = 0; txq < RXTX_QUEUE_COUNT; txq++) { |
| 140 | TEST_ASSERT(rte_eth_tx_queue_setup(port_id, txq, RXTX_RING_SIZE, |
| 141 | rte_eth_dev_socket_id(port_id), NULL) == 0, |
| 142 | "Failed to setup tx queue."); |
| 143 | } |
| 144 | |
| 145 | if (start) { |
| 146 | TEST_ASSERT(rte_eth_dev_start(port_id) == 0, |
| 147 | "Failed to start device (%d).", port_id); |
| 148 | } |
| 149 | |
| 150 | return 0; |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * Remove all members from bonding |
no test coverage detected