mirror of https://github.com/F-Stack/f-stack.git
Merge pull request #355 from jinhao2/master
ff_traffic.tx info should save the sent packets
This commit is contained in:
commit
a8cb335d27
|
@ -1285,20 +1285,18 @@ send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port)
|
||||||
ff_dump_packets(qconf->pcap[port], m_table[i]);
|
ff_dump_packets(qconf->pcap[port], m_table[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ff_traffic.tx_packets += n;
|
|
||||||
uint16_t i;
|
|
||||||
for (i = 0; i < n; i++) {
|
|
||||||
ff_traffic.tx_bytes += rte_pktmbuf_data_len(m_table[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = rte_eth_tx_burst(port, queueid, m_table, n);
|
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)) {
|
if (unlikely(ret < n)) {
|
||||||
do {
|
do {
|
||||||
rte_pktmbuf_free(m_table[ret]);
|
rte_pktmbuf_free(m_table[ret]);
|
||||||
} while (++ret < n);
|
} while (++ret < n);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue