Transmit errors must not be reported in q_errors[] which is for
reception.

Fixes: e1e4017751f1 ("ring: add new driver")
Cc: sta...@dpdk.org
Cc: Bruce Richardson <bruce.richard...@intel.com>
Signed-off-by: David Marchand <david.march...@redhat.com>
---
 drivers/net/ring/rte_eth_ring.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index aeb48f5..4865763 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -182,9 +182,8 @@ struct pmd_internals {
        for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS &&
                        i < dev->data->nb_tx_queues; i++) {
                stats->q_opackets[i] = internal->tx_ring_queues[i].tx_pkts.cnt;
-               stats->q_errors[i] = internal->tx_ring_queues[i].err_pkts.cnt;
                tx_total += stats->q_opackets[i];
-               tx_err_total += stats->q_errors[i];
+               tx_err_total += internal->tx_ring_queues[i].err_pkts.cnt;
        }
 
        stats->ipackets = rx_total;
-- 
1.8.3.1

Reply via email to