net/idpf: add hw stats ierrors

Message ID 20230224024142.183319-1-mingxia.liu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/idpf: add hw stats ierrors |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS

Commit Message

Liu, Mingxia Feb. 24, 2023, 2:41 a.m. UTC
  This patch adds hw stats ierrors, when receiving packets with
bad csum, ierrors value will increase.

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

Patch

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;