[dpdk-dev] [PATCH 01/12] net/af_packet: fix incorrect rxq errors stat

David Marchand david.marchand at redhat.com
Mon Mar 4 12:18:24 CET 2019


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 at dpdk.org
Cc: John W. Linville <linville at tuxdriver.com>
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 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 264cfc0..ec90cc0 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -328,10 +328,9 @@ struct pmd_internals {
 	        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];
 	}
 
-- 
1.8.3.1



More information about the dev mailing list