[04/12] net/cxgbe: fix incorrect rxq errors stat

Message ID 1551698315-2611-5-git-send-email-david.marchand@redhat.com
State Accepted
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: 856505d303f4 ("cxgbe: add port statistics")
Fixes: a0a344a8f728 ("net/cxgbe: add VF port statistics")
Cc: stable@dpdk.org
Cc: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/cxgbe/cxgbe_ethdev.c   | 1 -
 drivers/net/cxgbe/cxgbevf_ethdev.c | 1 -
 2 files changed, 2 deletions(-)

Patch

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 010a818..7c7a51d 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -705,7 +705,6 @@  static int cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
 
 		eth_stats->q_opackets[i] = txq->stats.pkts;
 		eth_stats->q_obytes[i] = txq->stats.tx_bytes;
-		eth_stats->q_errors[i] = txq->stats.mapping_err;
 	}
 	return 0;
 }
diff --git a/drivers/net/cxgbe/cxgbevf_ethdev.c b/drivers/net/cxgbe/cxgbevf_ethdev.c
index 0e93d99..0af9dd9 100644
--- a/drivers/net/cxgbe/cxgbevf_ethdev.c
+++ b/drivers/net/cxgbe/cxgbevf_ethdev.c
@@ -69,7 +69,6 @@  static int cxgbevf_dev_stats_get(struct rte_eth_dev *eth_dev,
 
 		eth_stats->q_opackets[i] = txq->stats.pkts;
 		eth_stats->q_obytes[i] = txq->stats.tx_bytes;
-		eth_stats->q_errors[i] = txq->stats.mapping_err;
 	}
 	return 0;
 }