fix a plurality of packets may not statistics in ff_traffic.rx_packets and ff_traffic.rx_bytes.

This commit is contained in:
fengbojiang 2021-09-02 11:47:13 +08:00
parent 9d5012a907
commit 0b4a084c8a
1 changed files with 2 additions and 2 deletions

View File

@ -1281,8 +1281,8 @@ process_packets(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **bufs,
uint16_t len = rte_pktmbuf_data_len(rtem);
if (!pkts_from_ring) {
ff_traffic.rx_packets++;
ff_traffic.rx_bytes += len;
ff_traffic.rx_packets += rtem->nb_segs;
ff_traffic.rx_bytes += rte_pktmbuf_pkt_len(rtem);
}
if (!pkts_from_ring && packet_dispatcher) {