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: sta...@dpdk.org
Cc: John W. Linville <linvi...@tuxdriver.com>
Signed-off-by: David Marchand <david.march...@redhat.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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];
        }
 
-- 
1.8.3.1

Reply via email to