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