| 149 | } |
| 150 | |
| 151 | static int |
| 152 | test_bit_packet_forward(void) |
| 153 | { |
| 154 | int ret; |
| 155 | struct rte_mbuf *pbuf[BIT_NUM_PACKETS] = { }; |
| 156 | struct rte_mempool *mp; |
| 157 | char poolname[] = "mbuf_pool"; |
| 158 | ret = test_get_mbuf_from_pool(&mp, pbuf, poolname); |
| 159 | if (ret < 0) { |
| 160 | printf("allocate mbuf pool Failed\n"); |
| 161 | return TEST_FAILED; |
| 162 | } |
| 163 | ret = test_dev_start(portid, mp); |
| 164 | if (ret < 0) { |
| 165 | printf("test_dev_start(%hu, %p) failed, error code: %d\n", |
| 166 | portid, mp, ret); |
| 167 | return TEST_FAILED; |
| 168 | } |
| 169 | |
| 170 | ret = test_packet_forward(pbuf, portid, QUEUE_ID); |
| 171 | if (ret < 0) |
| 172 | printf("send pkts Failed\n"); |
| 173 | |
| 174 | rte_eth_dev_stop(portid); |
| 175 | test_put_mbuf_to_pool(mp, pbuf); |
| 176 | |
| 177 | return (ret >= 0) ? TEST_SUCCESS : TEST_FAILED; |
| 178 | } |
| 179 | |
| 180 | static int |
| 181 | test_bit_ring_setup(void) |
nothing calls this directly
no test coverage detected