patch 'net/txgbe: 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:04 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/d580bc0e963706b918a18f752353b4cfebe18a98
Thanks.
Luca Boccassi
---
>From d580bc0e963706b918a18f752353b4cfebe18a98 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu at trustnetic.com>
Date: Fri, 13 Jun 2025 16:41:55 +0800
Subject: [PATCH] net/txgbe: fix device statistics
[ upstream commit d1406cf06220c78245bbb9db258f488e97f903e0 ]
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: c9bb590d4295 ("net/txgbe: support device statistics")
Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 697f1db579..3dfb510619 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2230,7 +2230,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
hw_stats->rx_total_bytes += rd64(hw, TXGBE_MACRXGBOCTL);
hw_stats->rx_broadcast_packets += rd64(hw, TXGBE_MACRXOCTL);
- hw_stats->tx_broadcast_packets += rd32(hw, TXGBE_MACTXOCTL);
+ hw_stats->tx_broadcast_packets += rd64(hw, TXGBE_MACTXOCTL);
hw_stats->rx_size_64_packets += rd64(hw, TXGBE_MACRX1TO64L);
hw_stats->rx_size_65_to_127_packets += rd64(hw, TXGBE_MACRX65TO127L);
@@ -2249,7 +2249,8 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
hw_stats->tx_size_1024_to_max_packets +=
rd64(hw, TXGBE_MACTX1024TOMAXL);
- hw_stats->rx_undersize_errors += rd64(hw, TXGBE_MACRXERRLENL);
+ hw_stats->rx_length_errors += rd64(hw, TXGBE_MACRXERRLENL);
+ hw_stats->rx_undersize_errors += rd32(hw, TXGBE_MACRXUNDERSIZE);
hw_stats->rx_oversize_cnt += rd32(hw, TXGBE_MACRXOVERSIZE);
hw_stats->rx_jabber_errors += rd32(hw, TXGBE_MACRXJABBER);
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-07-14 16:09:41.052239812 +0100
+++ 0009-net-txgbe-fix-device-statistics.patch 2025-07-14 16:09:40.700448723 +0100
@@ -1 +1 @@
-From d1406cf06220c78245bbb9db258f488e97f903e0 Mon Sep 17 00:00:00 2001
+From d580bc0e963706b918a18f752353b4cfebe18a98 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d1406cf06220c78245bbb9db258f488e97f903e0 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index b68a0557be..580579094b 100644
+index 697f1db579..3dfb510619 100644
@@ -26 +27 @@
-@@ -2250,7 +2250,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
+@@ -2230,7 +2230,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
@@ -35 +36 @@
-@@ -2269,7 +2269,8 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
+@@ -2249,7 +2249,8 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
More information about the stable
mailing list