X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftxonly.c;h=11fd681da1e673c879ce3949bd89ede5635f768f;hb=bf56fce1fb45b83747527e6312f61c0fcf3789b8;hp=0ac2a080925aed320cca8a3c2d846fa859b8164d;hpb=d76c19309a0b789d0f43e911db11c3ba3095819d;p=dpdk.git diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index 0ac2a08092..11fd681da1 100644 --- a/app/test-pmd/txonly.c +++ b/app/test-pmd/txonly.c @@ -193,6 +193,7 @@ pkt_burst_transmit(struct fwd_stream *fs) uint16_t nb_tx; uint16_t nb_pkt; uint16_t vlan_tci, vlan_tci_outer; + uint32_t retry; uint64_t ol_flags = 0; uint8_t i; #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES @@ -273,6 +274,17 @@ pkt_burst_transmit(struct fwd_stream *fs) pkts_burst[nb_pkt] = pkt; } nb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, pkts_burst, nb_pkt); + /* + * Retry if necessary + */ + if (unlikely(nb_tx < nb_pkt) && fs->retry_enabled) { + retry = 0; + while (nb_tx < nb_pkt && retry++ < burst_tx_retry_num) { + rte_delay_us(burst_tx_delay_time); + nb_tx += rte_eth_tx_burst(fs->tx_port, fs->tx_queue, + &pkts_burst[nb_tx], nb_pkt - nb_tx); + } + } fs->tx_packets += nb_tx; #ifdef RTE_TEST_PMD_RECORD_BURST_STATS