From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4CB1E41D52 for ; Thu, 23 Feb 2023 16:08:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 480524327F; Thu, 23 Feb 2023 16:08:00 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id BFFC043279 for ; Thu, 23 Feb 2023 16:07:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677164878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9ZmzjE20xeIIvqviALtw2k3Vk38SOJeD1P/qzIUiJFU=; b=RUP6He5rl+YC0TaM3Zz9ogMinZlltqkmZ5Hdn88GmPU3H8OQCurJjq7rc1vqah2eWqzeN5 JDF7I6N/mZObml3LOh5kzs7+A4gCSv2dzl6FKyqqrloMSNOwCYlm42DNWtR1VaEYcf9I0G wsFclMzLvpBSV7AQLBhjpkd2PTmBaF0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-318-KOTI2_OUPKu5UYUcwmVjfA-1; Thu, 23 Feb 2023 10:07:56 -0500 X-MC-Unique: KOTI2_OUPKu5UYUcwmVjfA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BCD93100F91F; Thu, 23 Feb 2023 15:07:50 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7CADC2166B30; Thu, 23 Feb 2023 15:07:49 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: Joshua Washington , Huisong Li , Aman Singh , dpdk stable Subject: patch 'app/testpmd: fix forwarding stats for Tx dropped' has been queued to stable release 21.11.4 Date: Thu, 23 Feb 2023 15:05:42 +0000 Message-Id: <20230223150631.723699-51-ktraynor@redhat.com> In-Reply-To: <20230223150631.723699-1-ktraynor@redhat.com> References: <20230223150631.723699-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/28/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/b641ca3033155683a3e3c225dba24e07fd52ea1b Thanks. Kevin --- >From b641ca3033155683a3e3c225dba24e07fd52ea1b Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 31 Jan 2023 11:56:03 +0000 Subject: [PATCH] app/testpmd: fix forwarding stats for Tx dropped [ 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 Signed-off-by: Ferruh Yigit Acked-by: Huisong Li Acked-by: Aman Singh --- 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 f1daa6e09d..4e15c982c8 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2078,4 +2078,6 @@ fwd_stats_display(void) } 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]; @@ -2099,6 +2101,7 @@ fwd_stats_display(void) 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; @@ -2127,6 +2130,6 @@ 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) { -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 14:46:25.043741769 +0000 +++ 0051-app-testpmd-fix-forwarding-stats-for-Tx-dropped.patch 2023-02-23 14:46:23.778235994 +0000 @@ -1 +1 @@ -From c3fd1e6089cce14ad3f941ab5df0501e03b3356c Mon Sep 17 00:00:00 2001 +From b641ca3033155683a3e3c225dba24e07fd52ea1b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c3fd1e6089cce14ad3f941ab5df0501e03b3356c ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ -index 86fa9c16ba..f3e29a5b4b 100644 +index f1daa6e09d..4e15c982c8 100644 @@ -32 +33 @@ -@@ -2062,4 +2062,6 @@ fwd_stats_display(void) +@@ -2078,4 +2078,6 @@ fwd_stats_display(void) @@ -39 +40 @@ -@@ -2083,6 +2085,7 @@ fwd_stats_display(void) +@@ -2099,6 +2101,7 @@ fwd_stats_display(void) @@ -49 +50 @@ -@@ -2111,6 +2114,6 @@ fwd_stats_display(void) +@@ -2127,6 +2130,6 @@ fwd_stats_display(void)