From: David Marchand Date: Mon, 4 Mar 2019 11:18:32 +0000 (+0100) Subject: net/pcap: fix RxQ errors stat X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=48d33133415d21e22eae0c7d78b1b8a0e41baba6;p=dpdk.git net/pcap: fix RxQ errors stat Transmit errors must not be reported in q_errors[] which is for reception. Fixes: 4c173302c307 ("pcap: add new driver") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Ferruh Yigit --- diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 10277b9b6f..a7c70833cf 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -605,10 +605,9 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) i < dev->data->nb_tx_queues; i++) { stats->q_opackets[i] = internal->tx_queue[i].tx_stat.pkts; stats->q_obytes[i] = internal->tx_queue[i].tx_stat.bytes; - stats->q_errors[i] = internal->tx_queue[i].tx_stat.err_pkts; tx_packets_total += stats->q_opackets[i]; tx_bytes_total += stats->q_obytes[i]; - tx_packets_err_total += stats->q_errors[i]; + tx_packets_err_total += internal->tx_queue[i].tx_stat.err_pkts; } stats->ipackets = rx_packets_total;