Sample test to forward packets using virtual portids */
| 124 | |
| 125 | /* Sample test to forward packets using virtual portids */ |
| 126 | int |
| 127 | test_packet_forward(struct rte_mbuf **pbuf, uint16_t portid, uint16_t queue_id) |
| 128 | { |
| 129 | /* send and receive packet and check for stats update */ |
| 130 | if (rte_eth_tx_burst(portid, queue_id, pbuf, NUM_PACKETS) |
| 131 | < NUM_PACKETS) { |
| 132 | printf("%s() line %u: Error sending packet to" |
| 133 | " port %d\n", __func__, __LINE__, portid); |
| 134 | return -1; |
| 135 | } |
| 136 | if (rte_eth_rx_burst(portid, queue_id, pbuf, NUM_PACKETS) |
| 137 | < NUM_PACKETS) { |
| 138 | printf("%s() line %u: Error receiving packet from" |
| 139 | " port %d\n", __func__, __LINE__, portid); |
| 140 | return -1; |
| 141 | } |
| 142 | return 0; |
| 143 | } |
no test coverage detected