Skip to contentSkip to conversation

net/idpf: fix incorrect status calculation

PATCH Applied [email protected] 3 participants 4 messages Sep 28, 2023 – Oct 24, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/idpf: fix incorrect status calculation

From: Yuying Zhang <[email protected]>

Fix the incorrect ingress packet number calculation.

Fixes 7514d76d407b ("net/idpf: add basic statistics")
---
 drivers/net/idpf/idpf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/idpf/idpf_ethdev.c +1 -1
index 3af7cf0bb7..6ae2ac2681 100644
@@ -281,7 +281,7 @@ idpf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
 		idpf_vport_stats_update(&vport->eth_stats_offset, pstats);
 		stats->ipackets = pstats->rx_unicast + pstats->rx_multicast +
-				pstats->rx_broadcast - pstats->rx_discards;
+				pstats->rx_broadcast;
 		stats->opackets = pstats->tx_broadcast + pstats->tx_multicast +
 						pstats->tx_unicast;
 		stats->ierrors = pstats->rx_errors;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 28 lines

-----Original Message-----
From: Zhang, Yuying <[email protected]>
Sent: Thursday, September 28, 2023 1:05 PM
To: Zhang, Yuying <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]
Subject: [PATCH v1] net/idpf: fix incorrect status calculation

From: Yuying Zhang <[email protected]>

Fix the incorrect ingress packet number calculation.

Fixes 7514d76d407b ("net/idpf: add basic statistics")
---
 drivers/net/idpf/idpf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/idpf/idpf_ethdev.c +0 -0
index 3af7cf0bb7..6ae2ac2681 100644

drivers/net/idpf/idpf_ethdev.c idpf_dev_stats_get(struct rte_eth_dev *dev, struct · line 285

Quoted 6 lines
drivers/net/idpf/idpf_ethdev.c +1 -1
@@ -281,7 +281,7 @@ idpf_dev_stats_get(struct rte_eth_dev *dev, struct
 rte_eth_stats *stats)
 
 		idpf_vport_stats_update(&vport->eth_stats_offset, pstats);
 		stats->ipackets = pstats->rx_unicast + pstats->rx_multicast +
-				pstats->rx_broadcast - pstats->rx_discards;
+				pstats->rx_broadcast;

Seems rx_error is also considered in ingress packets. Same for cpfl.

Quoted 6 lines
drivers/net/idpf/idpf_ethdev.c +1 -1
 		stats->opackets = pstats->tx_broadcast + pstats->tx_multicast
+
 						pstats->tx_unicast;
 		stats->ierrors = pstats->rx_errors;
--

2.34.1

Acked-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 39 lines

-----Original Message-----
From: Zhang, Yuying <[email protected]>
Sent: Thursday, September 28, 2023 1:05 PM
To: Zhang, Yuying <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]
Subject: [PATCH v1] net/idpf: fix incorrect status calculation

From: Yuying Zhang <[email protected]>

Fix the incorrect ingress packet number calculation.

Fixes 7514d76d407b ("net/idpf: add basic statistics")
---
 drivers/net/idpf/idpf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/idpf/idpf_ethdev.c +2 -2
index 3af7cf0bb7..6ae2ac2681 100644
@@ -281,7 +281,7 @@ idpf_dev_stats_get(struct rte_eth_dev *dev, struct
 rte_eth_stats *stats)
 
 		idpf_vport_stats_update(&vport->eth_stats_offset, pstats);
 		stats->ipackets = pstats->rx_unicast + pstats->rx_multicast +
-				pstats->rx_broadcast - pstats->rx_discards;
+				pstats->rx_broadcast;
 		stats->opackets = pstats->tx_broadcast + pstats->tx_multicast
+
 						pstats->tx_unicast;
 		stats->ierrors = pstats->rx_errors;
--
Quoted 1 line

2.34.1

Applied
#3 lore raw
Quoted 40 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Monday, October 23, 2023 5:01 PM
To: Zhang, Yuying <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH v1] net/idpf: fix incorrect status calculation

Quoted 28 lines

-----Original Message-----
From: Zhang, Yuying <[email protected]>
Sent: Thursday, September 28, 2023 1:05 PM
To: Zhang, Yuying <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]
Subject: [PATCH v1] net/idpf: fix incorrect status calculation

From: Yuying Zhang <[email protected]>

Fix the incorrect ingress packet number calculation.

Fixes 7514d76d407b ("net/idpf: add basic statistics")
---
 drivers/net/idpf/idpf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/net/idpf/idpf_ethdev.c index 3af7cf0bb7..6ae2ac2681 100644

drivers/net/idpf/idpf_ethdev.c +0 -0
@@ -281,7 +281,7 @@ idpf_dev_stats_get(struct rte_eth_dev *dev, struct
 rte_eth_stats *stats)
 
Quoted 12 lines
Quoted 10 lines
drivers/net/idpf/idpf_ethdev.c +2 -2
 		idpf_vport_stats_update(&vport->eth_stats_offset, pstats);
 		stats->ipackets = pstats->rx_unicast + pstats->rx_multicast +
-				pstats->rx_broadcast - pstats->rx_discards;
+				pstats->rx_broadcast;
 		stats->opackets = pstats->tx_broadcast + pstats->tx_multicast
+
 						pstats->tx_unicast;
 		stats->ierrors = pstats->rx_errors;
--

2.34.1

Applied to dpdk-next-net-intel.

Thanks
Qi