[01/12] net/af_packet: fix incorrect rxq errors stat
diff mbox series

Message ID 1551698315-2611-2-git-send-email-david.marchand@redhat.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • rxq q_errors[] statistics fixes
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS

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: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")
Cc: stable@dpdk.org
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 264cfc0..ec90cc0 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -328,10 +328,9 @@  struct pmd_internals {
 	        internal->nb_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS);
 	for (i = 0; i < imax; i++) {
 		igb_stats->q_opackets[i] = internal->tx_queue[i].tx_pkts;
-		igb_stats->q_errors[i] = internal->tx_queue[i].err_pkts;
 		igb_stats->q_obytes[i] = internal->tx_queue[i].tx_bytes;
 		tx_total += igb_stats->q_opackets[i];
-		tx_err_total += igb_stats->q_errors[i];
+		tx_err_total += internal->tx_queue[i].err_pkts;
 		tx_bytes_total += igb_stats->q_obytes[i];
 	}