q_errors counts received packets dropped, and is reported as the
rx_qN_errors xstat. The Rx loop fills it correctly, then the Tx loop
adds the Tx error count, so rx_qN_errors reports both.

Tx errors are already counted in oerrors, so drop the assignment.

Fixes: c80ab1a551cc ("net/xsc: support basic statistics")
Cc: [email protected]

Signed-off-by: Stephen Hemminger <[email protected]>
---
 drivers/net/xsc/xsc_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/xsc/xsc_ethdev.c b/drivers/net/xsc/xsc_ethdev.c
index 39a67ff8cd..505f973d66 100644
--- a/drivers/net/xsc/xsc_ethdev.c
+++ b/drivers/net/xsc/xsc_ethdev.c
@@ -614,7 +614,6 @@ xsc_ethdev_stats_get(struct rte_eth_dev *dev, struct 
rte_eth_stats *stats,
                if (qstats != NULL && idx < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
                        qstats->q_opackets[idx] += txq->stats.tx_pkts;
                        qstats->q_obytes[idx] += txq->stats.tx_bytes;
-                       qstats->q_errors[idx] += txq->stats.tx_errors;
                }
                stats->opackets += txq->stats.tx_pkts;
                stats->obytes += txq->stats.tx_bytes;
-- 
2.53.0

Reply via email to