| 137 | } |
| 138 | |
| 139 | uint32_t |
| 140 | send_pkts(void *empty __rte_unused) |
| 141 | { |
| 142 | int ret = 0; |
| 143 | struct rte_mbuf *pbuf[NUM_PACKETS] = { }; |
| 144 | struct rte_mempool *mp; |
| 145 | char poolname[] = "mbuf_pool_server"; |
| 146 | |
| 147 | ret = test_get_mbuf_from_pool(&mp, pbuf, poolname); |
| 148 | if (ret < 0) |
| 149 | printf("get_mbuf_from_pool failed\n"); |
| 150 | |
| 151 | ret = test_dev_start(portid, mp); |
| 152 | if (ret < 0) |
| 153 | printf("test_dev_start(%hu, %p) failed, error code: %d\n", |
| 154 | portid, mp, ret); |
| 155 | |
| 156 | while (ret >= 0 && flag_for_send_pkts) { |
| 157 | ret = test_packet_forward(pbuf, portid, QUEUE_ID); |
| 158 | if (ret < 0) |
| 159 | printf("send pkts Failed\n"); |
| 160 | }; |
| 161 | |
| 162 | rte_eth_dev_stop(portid); |
| 163 | test_put_mbuf_to_pool(mp, pbuf); |
| 164 | return 0; |
| 165 | } |
| 166 | |
| 167 | /* |
| 168 | * This function is called in the primary i.e. main test, to spawn off secondary |
nothing calls this directly
no test coverage detected