[09/12] net/pcap: fix incorrect rxq errors stat

Message ID 1551698315-2611-10-git-send-email-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series rxq q_errors[] statistics fixes |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

David Marchand March 4, 2019, 11:18 a.m. UTC
  Transmit errors must not be reported in q_errors[] which is for
reception.

Fixes: 4c173302c307 ("pcap: add new driver")
Cc: stable@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 65bbd7e..4d5e6ba 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -605,10 +605,9 @@  struct pmd_devargs {
 			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;