[dpdk-dev] [PATCH 5/9] i40e: don't report deprecated statistics

Stephen Hemminger stephen at networkplumber.org
Sat Oct 17 02:14:38 CEST 2015


From: Stephen Hemminger <shemming at brocade.com>

The fields in ethernet statistics that are marked deprecated
should not be filled in.

Signed-off-by: Stephen Hemminger <shemming at brocade.com>
---
 drivers/net/i40e/i40e_ethdev.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2dd9fdc..9d3341d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1518,15 +1518,12 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->ibytes   = ns->eth.rx_bytes;
 	stats->obytes   = ns->eth.tx_bytes;
 	stats->oerrors  = ns->eth.tx_errors;
-	stats->imcasts  = ns->eth.rx_multicast;
-	stats->fdirmatch = ns->fd_sb_match;
 
 	/* Rx Errors */
-	stats->ibadcrc  = ns->crc_errors;
-	stats->ibadlen  = ns->rx_length_errors + ns->rx_undersize +
-			ns->rx_oversize + ns->rx_fragments + ns->rx_jabber;
-	stats->imissed  = ns->eth.rx_discards;
-	stats->ierrors  = stats->ibadcrc + stats->ibadlen + stats->imissed;
+	stats->ierrors  = ns->crc_errors +
+			  ns->rx_length_errors + ns->rx_undersize +
+			  ns->rx_oversize + ns->rx_fragments + ns->rx_jabber +
+			  ns->eth.rx_discards;
 
 	PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************");
 	PMD_DRV_LOG(DEBUG, "rx_bytes:            %"PRIu64"", ns->eth.rx_bytes);
-- 
2.1.4



More information about the dev mailing list