[dpdk-stable] patch 'net/txgbe: fix Rx missed packet counter' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 17:59:40 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/12/21. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4d4ae30d079595fceae005624f66f96fb630fda0

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 4d4ae30d079595fceae005624f66f96fb630fda0 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu at trustnetic.com>
Date: Fri, 5 Mar 2021 10:14:36 +0800
Subject: [PATCH] net/txgbe: fix Rx missed packet counter
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit fa702fde0c3670bf0a206d9e074046274233c516 ]

Add the Rx dropped packet counter into stats->imissed, to ensure the
stats correct.

Fixes: c9bb590d4295 ("net/txgbe: support device statistics")

Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_type.h | 1 +
 drivers/net/txgbe/txgbe_ethdev.c    | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index b322a2cac8..4e9a7deb12 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -284,6 +284,7 @@ struct txgbe_hw_stats {
 	u64 rx_management_packets;
 	u64 tx_management_packets;
 	u64 rx_management_dropped;
+	u64 rx_dma_drop;
 	u64 rx_drop_packets;
 
 	/* Basic Error */
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index f8dffe1f12..63bae511ef 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -1881,6 +1881,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
 
 	hw_stats->rx_bytes += rd64(hw, TXGBE_DMARXOCTL);
 	hw_stats->tx_bytes += rd64(hw, TXGBE_DMATXOCTL);
+	hw_stats->rx_dma_drop += rd32(hw, TXGBE_DMARXDROP);
 	hw_stats->rx_drop_packets += rd32(hw, TXGBE_PBRXDROP);
 
 	/* MAC Stats */
@@ -2029,7 +2030,8 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	}
 
 	/* Rx Errors */
-	stats->imissed  = hw_stats->rx_total_missed_packets;
+	stats->imissed  = hw_stats->rx_total_missed_packets +
+			  hw_stats->rx_dma_drop;
 	stats->ierrors  = hw_stats->rx_crc_errors +
 			  hw_stats->rx_mac_short_packet_dropped +
 			  hw_stats->rx_length_errors +
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.505093800 +0800
+++ 0032-net-txgbe-fix-Rx-missed-packet-counter.patch	2021-05-10 23:59:26.360000000 +0800
@@ -1 +1 @@
-From fa702fde0c3670bf0a206d9e074046274233c516 Mon Sep 17 00:00:00 2001
+From 4d4ae30d079595fceae005624f66f96fb630fda0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit fa702fde0c3670bf0a206d9e074046274233c516 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index ef8358ae37..2c8a3866a7 100644
+index b322a2cac8..4e9a7deb12 100644
@@ -22 +24 @@
-@@ -353,6 +353,7 @@ struct txgbe_hw_stats {
+@@ -284,6 +284,7 @@ struct txgbe_hw_stats {
@@ -31 +33 @@
-index 90137d0ceb..1ab8d2cded 100644
+index f8dffe1f12..63bae511ef 100644
@@ -34 +36 @@
-@@ -2080,6 +2080,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
+@@ -1881,6 +1881,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
@@ -42 +44 @@
-@@ -2228,7 +2229,8 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -2029,7 +2030,8 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)


More information about the stable mailing list