| 105 | } |
| 106 | |
| 107 | void |
| 108 | app_tx_thread(struct thread_conf **confs) |
| 109 | { |
| 110 | struct rte_mbuf *mbufs[burst_conf.qos_dequeue]; |
| 111 | struct thread_conf *conf; |
| 112 | int conf_idx = 0; |
| 113 | int nb_pkts; |
| 114 | |
| 115 | while ((conf = confs[conf_idx])) { |
| 116 | nb_pkts = rte_ring_sc_dequeue_burst(conf->tx_ring, (void **)mbufs, |
| 117 | burst_conf.qos_dequeue, NULL); |
| 118 | if (likely(nb_pkts != 0)) { |
| 119 | uint16_t nb_tx = rte_eth_tx_burst(conf->tx_port, 0, mbufs, nb_pkts); |
| 120 | if (nb_pkts != nb_tx) |
| 121 | rte_pktmbuf_free_bulk(&mbufs[nb_tx], nb_pkts - nb_tx); |
| 122 | } |
| 123 | |
| 124 | conf_idx++; |
| 125 | if (confs[conf_idx] == NULL) |
| 126 | conf_idx = 0; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | |
| 131 | void |
no test coverage detected