From 31b46e57358d5471d43e3e8b1f9d2060092f7622 Mon Sep 17 00:00:00 2001 From: "jin.hao1" Date: Fri, 15 Mar 2019 18:07:15 +0800 Subject: [PATCH] recommit --- lib/ff_dpdk_if.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ff_dpdk_if.c b/lib/ff_dpdk_if.c index 6817fbe85..e7162a432 100644 --- a/lib/ff_dpdk_if.c +++ b/lib/ff_dpdk_if.c @@ -1279,18 +1279,16 @@ send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port) } ret = rte_eth_tx_burst(port, queueid, m_table, n); + ff_traffic.tx_packets += ret; + uint16_t i; + for (i = 0; i < ret; i++) { + ff_traffic.tx_bytes += rte_pktmbuf_pkt_len(m_table[i]); + } if (unlikely(ret < n)) { do { rte_pktmbuf_free(m_table[ret]); } while (++ret < n); } - - ff_traffic.tx_packets += ret; - uint16_t i; - for (i = 0; i < ret; i++) { - ff_traffic.tx_bytes += rte_pktmbuf_pkt_len(m_table[i]); - } - return 0; }