Send the burst of packets on an output interface */
| 561 | |
| 562 | /* Send the burst of packets on an output interface */ |
| 563 | static int |
| 564 | l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n, |
| 565 | uint16_t port) |
| 566 | { |
| 567 | struct rte_mbuf **pkt_buffer; |
| 568 | unsigned ret; |
| 569 | |
| 570 | pkt_buffer = (struct rte_mbuf **)qconf->pkt_buf[port].buffer; |
| 571 | |
| 572 | ret = rte_eth_tx_burst(port, 0, pkt_buffer, (uint16_t)n); |
| 573 | port_statistics[port].tx += ret; |
| 574 | if (unlikely(ret < n)) { |
| 575 | port_statistics[port].dropped += (n - ret); |
| 576 | do { |
| 577 | rte_pktmbuf_free(pkt_buffer[ret]); |
| 578 | } while (++ret < n); |
| 579 | } |
| 580 | |
| 581 | return 0; |
| 582 | } |
| 583 | |
| 584 | /* Enqueue packets for TX and prepare them to be sent. 8< */ |
| 585 | static int |
no test coverage detected