From c1f9d6c698453fc59b37900ebe4deeae1e98233f Mon Sep 17 00:00:00 2001 From: David Marchand Date: Mon, 4 Mar 2019 12:18:33 +0100 Subject: [PATCH] net/ring: fix RxQ errors stat 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 Reviewed-by: Ferruh Yigit --- 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 cae63a7f10..65c2813ba1 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -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; -- 2.20.1