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 77FE741D4F for ; Thu, 23 Feb 2023 10:39:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 749A94316E; Thu, 23 Feb 2023 10:39:04 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id 7BBFA427E9 for ; Thu, 23 Feb 2023 10:39:02 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id l1so9855306wry.10 for ; Thu, 23 Feb 2023 01:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OHEBDN+mheoAHM7SC/hA4xnWe/7ZlSnwWZVv5njrGLU=; b=mvtU/9d6s7xi4xkerWFgoHFpUvJGsVSMNoBjNElcLVZhnwjgN2uxZ2Hj4UvyLQqhTz VB7fzi+N5kxaVKdBmy/r7uZe686AEOaujPOw582WH36dHJ9Sso5+6AAc0mmNYSW/9Fgx MI9fZLzGDzlfBjV2fZNdCbKmXmXLdQ9ih0Du0eaOd98Y3/H4L2fHV+8ZYreBBKZYJUCH lXzOWViH6JgD55HLRGQRaIbOx1+ZIQgk2YV6+pcns44kK4JLr2qCFtjk4Dqyvhg+jGD7 H3rlNnHrl4M1nqPOgzlXGIAr+9jEXV/C2hPjGe526URCtuI/urTskBhTnxCRrBNVfAlU bqZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OHEBDN+mheoAHM7SC/hA4xnWe/7ZlSnwWZVv5njrGLU=; b=OLlIuEEwNa/pMDmLc8dSt+33r/j1gbIuuswWuk62YS54FydEPEM/HyZdsAAgJ8sd5m NkH0x4o9Oqk9EpXPApWIi5wjUMVQ22W0Vj4tHyEjpOk1jr+amsPK2y70CThhGfhWVC5J z/FSlnxzRE8/jlSzXbOo/UXY5JhLsjXBYcEgT/KCSWRQs9EwoSz7wlCwvkpG+6ddMMgi bBRxfFXGK/0nvhUhbny76+ojoQ6bhAkYtms5Hzw64NZ8f4l8Uo+l8IoLEzql5PTSa4lt TNo0MUmtYxMVutXB5qKACLdhP9+NiaT5/nDdRChnNaDKjwYAyY3k3OnVK55K2ZCPgMNB xE8A== X-Gm-Message-State: AO0yUKXnIbZQGtOEqazJ0YUZoUPonUOdF3UkMVb8PYlUFF+dT64hZlrx 9pHvfMVc8TcwELUsr+k4+x4= X-Google-Smtp-Source: AK7set9XOFmnYk3ImBTIXvYctLoZTdgBvRS3bnzfRpUeVO4Vnhv7kBLkND9O4BNmNG9mwXzqbLordw== X-Received: by 2002:a5d:5919:0:b0:2c4:24c:7d5e with SMTP id v25-20020a5d5919000000b002c4024c7d5emr9067851wrd.16.1677145142264; Thu, 23 Feb 2023 01:39:02 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id x4-20020adfdd84000000b002c556a4f1casm9208293wrl.42.2023.02.23.01.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:39:01 -0800 (PST) From: luca.boccassi@gmail.com 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 20.11.8 Date: Thu, 23 Feb 2023 09:36:39 +0000 Message-Id: <20230223093715.3926893-35-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.8 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/25/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/632cf722cc2a9f850de14fa1a79adfced8449228 Thanks. Luca Boccassi --- >From 632cf722cc2a9f850de14fa1a79adfced8449228 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 799fa9f539..508f2c4268 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1845,6 +1845,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]; @@ -1866,8 +1868,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", @@ -1891,8 +1894,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.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:29.644052780 +0000 +++ 0035-app-testpmd-fix-forwarding-stats-for-Tx-dropped.patch 2023-02-23 09:36:28.238170161 +0000 @@ -1 +1 @@ -From c3fd1e6089cce14ad3f941ab5df0501e03b3356c Mon Sep 17 00:00:00 2001 +From 632cf722cc2a9f850de14fa1a79adfced8449228 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 799fa9f539..508f2c4268 100644 @@ -32,2 +33,2 @@ -@@ -2061,6 +2061,8 @@ fwd_stats_display(void) - fwd_cycles += fs->busy_cycles; +@@ -1845,6 +1845,8 @@ fwd_stats_display(void) + fwd_cycles += fs->core_cycles; @@ -41 +42 @@ -@@ -2082,8 +2084,9 @@ fwd_stats_display(void) +@@ -1866,8 +1868,9 @@ fwd_stats_display(void) @@ -53 +54 @@ -@@ -2110,8 +2113,8 @@ fwd_stats_display(void) +@@ -1891,8 +1894,8 @@ fwd_stats_display(void)