[05/12] net/kni: fix incorrect rxq errors stat
diff mbox series

Message ID 1551698315-2611-6-git-send-email-david.marchand@redhat.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • rxq q_errors[] statistics fixes
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

David Marchand March 4, 2019, 11:18 a.m. UTC
Transmit errors must not be reported in q_errors[] which is for
reception.

Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/kni/rte_eth_kni.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index a1e9970..363f80d 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -285,10 +285,9 @@  struct pmd_internals {
 		q = data->tx_queues[i];
 		stats->q_opackets[i] = q->tx.pkts;
 		stats->q_obytes[i] = q->tx.bytes;
-		stats->q_errors[i] = q->tx.err_pkts;
 		tx_packets_total += stats->q_opackets[i];
 		tx_bytes_total += stats->q_obytes[i];
-		tx_packets_err_total += stats->q_errors[i];
+		tx_packets_err_total += q->tx.err_pkts;
 	}
 
 	stats->ipackets = rx_packets_total;