Skip to contentSkip to conversation

net/idpf: add hw stats ierrors

PATCH New Mingxia Liu 2 participants 4 messages Feb 21, 2023 – Feb 24, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/idpf: add hw stats ierrors

This patch add hw stats ierrors, when receive packets with bad csum, ierrors value will increase.

---
 drivers/net/idpf/idpf_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/idpf/idpf_ethdev.c +1 -0
index 38cbbf369d..5b4f4fd82b 100644
@@ -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;
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 net/idpf: add hw stats ierrors

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

---
 drivers/net/idpf/idpf_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/idpf/idpf_ethdev.c +1 -0
index 38cbbf369d..5b4f4fd82b 100644
@@ -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;
Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 1/1 net/idpf: add hw stats ierrors

In reply to Mingxia Liu

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

---
 drivers/net/idpf/idpf_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/idpf/idpf_ethdev.c +1 -0
index 38cbbf369d..5b4f4fd82b 100644
@@ -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;
Signature · 1 line
2.25.1
Acked-by on v2 1/1
#3 lore raw
Quoted 33 lines

-----Original Message-----
From: Liu, Mingxia <[email protected]>
Sent: Friday, February 24, 2023 10:43 AM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Liu, Mingxia <[email protected]>
Subject: [PATCH v2] net/idpf: add hw stats ierrors

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

---
 drivers/net/idpf/idpf_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/idpf/idpf_ethdev.c +2 -1
index 38cbbf369d..5b4f4fd82b 100644
@@ -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;
--
Quoted 1 line

2.25.1