patch 'app/testpmd: fix forwarding stats for Tx dropped' has been queued to stable release 22.11.2
Xueming Li
xuemingl at nvidia.com
Mon Feb 27 07:59:58 CET 2023
Hi,
FYI, your patch has been queued to stable release 22.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 03/01/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=a1d3811bc0ca7d7031319f2fc4a1fbee8a6d14b5
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From a1d3811bc0ca7d7031319f2fc4a1fbee8a6d14b5 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at amd.com>
Date: Tue, 31 Jan 2023 11:56:03 +0000
Subject: [PATCH] app/testpmd: fix forwarding stats for Tx dropped
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit c3fd1e6089cce14ad3f941ab5df0501e03b3356c ]
There is an inconsistency at displaying Tx dropped value for per port
forwarding stats and accumulated forwarding stats.
While displaying per port TX-dropped value, it only takes
'ports_stats[pt_id].tx_dropped' into account,
but for accumulated TX-dropped results it takes both
'ports_stats[pt_id].tx_dropped' & 'stats.oerrors' into account.
To fix, make both per port and accumulated stats display 'tx_dropped'
and 'stats.oerrors' (ports_stats[pt_id].tx_dropped + stats.oerrors).
Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")
Reported-by: Joshua Washington <joshwash at google.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
Acked-by: Huisong Li <lihuisong at huawei.com>
Acked-by: Aman Singh <aman.deep.singh at intel.com>
---
app/test-pmd/testpmd.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e366f81a0f..3c404c8a6e 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2056,6 +2056,8 @@ fwd_stats_display(void)
fwd_cycles += fs->core_cycles;
}
for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
+ uint64_t tx_dropped = 0;
+
pt_id = fwd_ports_ids[i];
port = &ports[pt_id];
@@ -2077,8 +2079,9 @@ fwd_stats_display(void)
total_recv += stats.ipackets;
total_xmit += stats.opackets;
total_rx_dropped += stats.imissed;
- total_tx_dropped += ports_stats[pt_id].tx_dropped;
- total_tx_dropped += stats.oerrors;
+ tx_dropped += ports_stats[pt_id].tx_dropped;
+ tx_dropped += stats.oerrors;
+ total_tx_dropped += tx_dropped;
total_rx_nombuf += stats.rx_nombuf;
printf("\n %s Forward statistics for port %-2d %s\n",
@@ -2105,8 +2108,8 @@ fwd_stats_display(void)
printf(" TX-packets: %-14"PRIu64" TX-dropped: %-14"PRIu64
"TX-total: %-"PRIu64"\n",
- stats.opackets, ports_stats[pt_id].tx_dropped,
- stats.opackets + ports_stats[pt_id].tx_dropped);
+ stats.opackets, tx_dropped,
+ stats.opackets + tx_dropped);
if (record_burst_stats) {
if (ports_stats[pt_id].rx_stream)
--
2.25.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-27 14:08:43.803353700 +0800
+++ 0091-app-testpmd-fix-forwarding-stats-for-Tx-dropped.patch 2023-02-27 14:08:40.819237000 +0800
@@ -1 +1 @@
-From c3fd1e6089cce14ad3f941ab5df0501e03b3356c Mon Sep 17 00:00:00 2001
+From a1d3811bc0ca7d7031319f2fc4a1fbee8a6d14b5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit c3fd1e6089cce14ad3f941ab5df0501e03b3356c ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org
@@ -29 +31 @@
-index 86fa9c16ba..f3e29a5b4b 100644
+index e366f81a0f..3c404c8a6e 100644
@@ -32,2 +34,2 @@
-@@ -2061,6 +2061,8 @@ fwd_stats_display(void)
- fwd_cycles += fs->busy_cycles;
+@@ -2056,6 +2056,8 @@ fwd_stats_display(void)
+ fwd_cycles += fs->core_cycles;
@@ -41 +43 @@
-@@ -2082,8 +2084,9 @@ fwd_stats_display(void)
+@@ -2077,8 +2079,9 @@ fwd_stats_display(void)
@@ -53 +55 @@
-@@ -2110,8 +2113,8 @@ fwd_stats_display(void)
+@@ -2105,8 +2108,8 @@ fwd_stats_display(void)
More information about the stable
mailing list