From 3b79ed8a39555aca070671593ae97b753638a19c Mon Sep 17 00:00:00 2001 From: David Marchand Date: Mon, 4 Mar 2019 12:18:24 +0100 Subject: [PATCH] net/af_packet: fix RxQ errors stat Transmit errors must not be reported in q_errors[] which is for reception. Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Ferruh Yigit --- drivers/net/af_packet/rte_eth_af_packet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index b5c4befce4..4a660d5f01 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -329,10 +329,9 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats) internal->nb_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS); for (i = 0; i < imax; i++) { igb_stats->q_opackets[i] = internal->tx_queue[i].tx_pkts; - igb_stats->q_errors[i] = internal->tx_queue[i].err_pkts; igb_stats->q_obytes[i] = internal->tx_queue[i].tx_bytes; tx_total += igb_stats->q_opackets[i]; - tx_err_total += igb_stats->q_errors[i]; + tx_err_total += internal->tx_queue[i].err_pkts; tx_bytes_total += igb_stats->q_obytes[i]; } -- 2.20.1