[08/12] net/null: fix incorrect rxq errors stat

Message ID 1551698315-2611-9-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.
Transmit errors must not be reported in q_errors[] which is for
reception.

Fixes: c743e50c475f ("null: new poll mode driver")
Cc: stable@dpdk.org
Cc: Tetsuya Mukawa <mtetsuyah@gmail.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/null/rte_eth_null.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 159c1c1..0e30886 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -333,10 +333,8 @@  struct pmd_internals {
 	for (i = 0; i < num_stats; i++) {
 		igb_stats->q_opackets[i] =
 			internal->tx_null_queues[i].tx_pkts.cnt;
-		igb_stats->q_errors[i] =
-			internal->tx_null_queues[i].err_pkts.cnt;
 		tx_total += igb_stats->q_opackets[i];
-		tx_err_total += igb_stats->q_errors[i];
+		tx_err_total += internal->tx_null_queues[i].err_pkts.cnt;
 	}
 
 	igb_stats->ipackets = rx_total;