| 876 | } |
| 877 | |
| 878 | static inline uint16_t |
| 879 | common_fwd_stream_transmit(struct fwd_stream *fs, struct rte_mbuf **burst, |
| 880 | unsigned int nb_pkts) |
| 881 | { |
| 882 | uint16_t nb_tx; |
| 883 | uint32_t retry; |
| 884 | |
| 885 | nb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, burst, nb_pkts); |
| 886 | /* |
| 887 | * Retry if necessary |
| 888 | */ |
| 889 | if (unlikely(nb_tx < nb_pkts) && fs->retry_enabled) { |
| 890 | retry = 0; |
| 891 | while (nb_tx < nb_pkts && retry++ < burst_tx_retry_num) { |
| 892 | rte_delay_us(burst_tx_delay_time); |
| 893 | nb_tx += rte_eth_tx_burst(fs->tx_port, fs->tx_queue, |
| 894 | &burst[nb_tx], nb_pkts - nb_tx); |
| 895 | } |
| 896 | } |
| 897 | fs->tx_packets += nb_tx; |
| 898 | if (record_burst_stats) |
| 899 | fs->tx_burst_stats.pkt_burst_spread[nb_tx]++; |
| 900 | if (unlikely(nb_tx < nb_pkts)) { |
| 901 | fs->fwd_dropped += (nb_pkts - nb_tx); |
| 902 | rte_pktmbuf_free_bulk(&burst[nb_tx], nb_pkts - nb_tx); |
| 903 | } |
| 904 | |
| 905 | return nb_tx; |
| 906 | } |
| 907 | |
| 908 | /* Prototypes */ |
| 909 | unsigned int parse_item_list(const char *str, const char *item_name, |
no test coverage detected