net/ring: fix RxQ errors stat
authorDavid Marchand <david.marchand@redhat.com>
Mon, 4 Mar 2019 11:18:33 +0000 (12:18 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jun 2019 11:21:20 +0000 (20:21 +0900)
Transmit errors must not be reported in q_errors[] which is for
reception.

Fixes: e1e4017751f1 ("ring: add new driver")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/ring/rte_eth_ring.c

index cae63a7..65c2813 100644 (file)
@@ -184,9 +184,8 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
        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;