Skip to contentSkip to conversation

net/cpfl: fix incorrect status calculation

PATCH Applied Zhang, Yuying 3 participants 3 messages Sep 21, 2023 – Oct 24, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

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

From: Yuying Zhang <[email protected]>

Fix the incorrect ingress packet number calculation.

Fixes e3289d8fb63f ("net/cpfl: support basic statistics")
---
 drivers/net/cpfl/cpfl_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/cpfl/cpfl_ethdev.c +1 -1
index c4ca9343c3..8c02c84c5b 100644
@@ -304,7 +304,7 @@ cpfl_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->imissed = pstats->rx_discards;
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 37 lines

-----Original Message-----
From: Zhang, Yuying <[email protected]>
Sent: Tuesday, August 22, 2023 9:17 AM
To: Zhang, Yuying <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Subject: [PATCH v1] net/cpfl: fix incorrect status calculation

From: Yuying Zhang <[email protected]>

Fix the incorrect ingress packet number calculation.

Fixes e3289d8fb63f ("net/cpfl: support basic statistics")
---
 drivers/net/cpfl/cpfl_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/cpfl/cpfl_ethdev.c +2 -2
index c4ca9343c3..8c02c84c5b 100644
@@ -304,7 +304,7 @@ cpfl_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->imissed = pstats->rx_discards;
--
Quoted 1 line

2.25.1

Applied
#2 lore raw
Quoted 38 lines

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

Quoted 26 lines

-----Original Message-----
From: Zhang, Yuying <[email protected]>
Sent: Tuesday, August 22, 2023 9:17 AM
To: Zhang, Yuying <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Subject: [PATCH v1] net/cpfl: fix incorrect status calculation

From: Yuying Zhang <[email protected]>

Fix the incorrect ingress packet number calculation.

Fixes e3289d8fb63f ("net/cpfl: support basic statistics")
---
 drivers/net/cpfl/cpfl_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/net/cpfl/cpfl_ethdev.c index c4ca9343c3..8c02c84c5b 100644

drivers/net/cpfl/cpfl_ethdev.c +0 -0
@@ -304,7 +304,7 @@ cpfl_dev_stats_get(struct rte_eth_dev *dev, struct
 rte_eth_stats *stats)
 
Quoted 13 lines
Quoted 10 lines
drivers/net/cpfl/cpfl_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->imissed = pstats->rx_discards;
--

2.25.1

Applied to dpdk-next-net-intel.

Thanks
Qi