patch 'net/ngbe: fix device statistics' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 14 17:11:05 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/16/25. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ff8e0566e2ec8d3b8102523854a664b546c4f9d4
Thanks.
Luca Boccassi
---
>From ff8e0566e2ec8d3b8102523854a664b546c4f9d4 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu at trustnetic.com>
Date: Fri, 13 Jun 2025 16:41:56 +0800
Subject: [PATCH] net/ngbe: fix device statistics
[ upstream commit a65009b7621a60faeb1bbefe65160eb5646925dc ]
The extend statistic "rx_undersize_errors" is incorrectly read as the
counter of frames received with a length error, which names
"rx_length_error". And "rx_undersize_errors" is the counter of
shorter-than-64B frames received without any errors.
In addition, "tx_broadcast_packets" should use rd64() to get the full
count on the low and high registers.
Fixes: fdb1e851975a ("net/ngbe: support basic statistics")
Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
---
drivers/net/ngbe/ngbe_ethdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index deaf415623..79303a76ef 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1421,7 +1421,7 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
hw_stats->rx_total_bytes += rd64(hw, NGBE_MACRXGBOCTL);
hw_stats->rx_broadcast_packets += rd64(hw, NGBE_MACRXOCTL);
- hw_stats->tx_broadcast_packets += rd32(hw, NGBE_MACTXOCTL);
+ hw_stats->tx_broadcast_packets += rd64(hw, NGBE_MACTXOCTL);
hw_stats->rx_size_64_packets += rd64(hw, NGBE_MACRX1TO64L);
hw_stats->rx_size_65_to_127_packets += rd64(hw, NGBE_MACRX65TO127L);
@@ -1440,7 +1440,8 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
hw_stats->tx_size_1024_to_max_packets +=
rd64(hw, NGBE_MACTX1024TOMAXL);
- hw_stats->rx_undersize_errors += rd64(hw, NGBE_MACRXERRLENL);
+ hw_stats->rx_length_errors += rd64(hw, NGBE_MACRXERRLENL);
+ hw_stats->rx_undersize_errors += rd32(hw, NGBE_MACRXUNDERSIZE);
hw_stats->rx_oversize_cnt += rd32(hw, NGBE_MACRXOVERSIZE);
hw_stats->rx_jabber_errors += rd32(hw, NGBE_MACRXJABBER);
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-07-14 16:09:41.088524357 +0100
+++ 0010-net-ngbe-fix-device-statistics.patch 2025-07-14 16:09:40.704448810 +0100
@@ -1 +1 @@
-From a65009b7621a60faeb1bbefe65160eb5646925dc Mon Sep 17 00:00:00 2001
+From ff8e0566e2ec8d3b8102523854a664b546c4f9d4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a65009b7621a60faeb1bbefe65160eb5646925dc ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index a8f847de8d..d3ac40299f 100644
+index deaf415623..79303a76ef 100644
@@ -26 +27 @@
-@@ -1429,7 +1429,7 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
+@@ -1421,7 +1421,7 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
@@ -35 +36 @@
-@@ -1448,7 +1448,8 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
+@@ -1440,7 +1440,8 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
More information about the stable
mailing list