err_pkts reflects the number of packets that the driver did not manage
to send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: e1e4017751f1 ("ring: add new driver")
Cc: sta...@dpdk.org

Signed-off-by: David Marchand <david.march...@redhat.com>
---
 drivers/net/ring/rte_eth_ring.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index eb347bc..eef7606 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -172,7 +172,7 @@ static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
        unsigned int i;
-       unsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;
+       unsigned long rx_total = 0, tx_total = 0;
        const struct pmd_internals *internal = dev->data->dev_private;
 
        for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS &&
@@ -185,12 +185,10 @@ eth_stats_get(struct rte_eth_dev *dev, struct 
rte_eth_stats *stats)
                        i < dev->data->nb_tx_queues; i++) {
                stats->q_opackets[i] = internal->tx_ring_queues[i].tx_pkts.cnt;
                tx_total += stats->q_opackets[i];
-               tx_err_total += internal->tx_ring_queues[i].err_pkts.cnt;
        }
 
        stats->ipackets = rx_total;
        stats->opackets = tx_total;
-       stats->oerrors = tx_err_total;
 
        return 0;
 }
-- 
1.8.3.1

Reply via email to