This patch adds hw stats ierrors, when receiving packets with
bad csum, ierrors value will increase.

Signed-off-by: Mingxia Liu <mingxia....@intel.com>
---
 drivers/net/idpf/idpf_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index 38cbbf369d..5b4f4fd82b 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -291,6 +291,7 @@ idpf_dev_stats_get(struct rte_eth_dev *dev, struct 
rte_eth_stats *stats)
                                pstats->rx_broadcast - pstats->rx_discards;
                stats->opackets = pstats->tx_broadcast + pstats->tx_multicast +
                                                pstats->tx_unicast;
+               stats->ierrors = pstats->rx_errors;
                stats->imissed = pstats->rx_discards;
                stats->oerrors = pstats->tx_errors + pstats->tx_discards;
                stats->ibytes = pstats->rx_bytes;
-- 
2.25.1

Reply via email to