From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 268B8A0613 for ; Tue, 27 Aug 2019 11:31:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E18354AE; Tue, 27 Aug 2019 11:31:24 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id DB0881C07F for ; Tue, 27 Aug 2019 11:31:21 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B3C53082126; Tue, 27 Aug 2019 09:31:21 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-48.ams2.redhat.com [10.36.117.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7140A5C1B2; Tue, 27 Aug 2019 09:31:20 +0000 (UTC) From: Kevin Traynor To: Tomasz Jozwiak Cc: Akhil Goyal , dpdk stable Date: Tue, 27 Aug 2019 10:30:04 +0100 Message-Id: <20190827093032.20423-27-ktraynor@redhat.com> In-Reply-To: <20190827093032.20423-1-ktraynor@redhat.com> References: <20190827093032.20423-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 27 Aug 2019 09:31:21 +0000 (UTC) Subject: [dpdk-stable] patch 'app/crypto-perf: fix display once detection' has been queued to LTS release 18.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 09/03/19. 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-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/0f5ef64001a86423f63a462f122acd0d546331f8 Thanks. Kevin Traynor --- >From 0f5ef64001a86423f63a462f122acd0d546331f8 Mon Sep 17 00:00:00 2001 From: Tomasz Jozwiak Date: Sat, 15 Jun 2019 00:28:35 +0200 Subject: [PATCH] app/crypto-perf: fix display once detection [ upstream commit 90e03347ca7d6d1a0e1b85d71d71ec5ae3b17a90 ] This patch changes 'only_once' variable to 'display_once', which should be atomic type due to fact, that all runner functions can be executed in paraller way on different lcores. Fixes: df52cb3b6e13 ("app/crypto-perf: move verify as single test type") Signed-off-by: Tomasz Jozwiak Acked-by: Akhil Goyal --- app/test-crypto-perf/cperf_test_latency.c | 5 ++--- app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 8 +++----- app/test-crypto-perf/cperf_test_throughput.c | 8 +++----- app/test-crypto-perf/cperf_test_verify.c | 8 +++----- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c index c9c98dc50..ec229bed2 100644 --- a/app/test-crypto-perf/cperf_test_latency.c +++ b/app/test-crypto-perf/cperf_test_latency.c @@ -129,5 +129,5 @@ cperf_latency_test_runner(void *arg) uint32_t imix_idx = 0; - static int only_once; + static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0); if (ctx == NULL) @@ -311,5 +311,5 @@ cperf_latency_test_runner(void *arg) if (ctx->options->csv) { - if (!only_once) + if (rte_atomic16_test_and_set(&display_once)) printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, " "Packet Size, cycles, time (us)"); @@ -326,5 +326,4 @@ cperf_latency_test_runner(void *arg) } - only_once = 1; } else { printf("\n# Device %d on lcore %u\n", ctx->dev_id, diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c index c87ae7d36..1f700a3d1 100644 --- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c +++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c @@ -391,5 +391,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) state.linearize = 0; - static int only_once; + static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0); static bool warmup = true; @@ -437,5 +437,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) if (!opts->csv) { - if (!only_once) + if (rte_atomic16_test_and_set(&display_once)) printf(PRETTY_HDR_FMT, "lcore id", "Buf Size", "Burst Size", "Enqueued", @@ -443,5 +443,4 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) "Deq Retries", "Cycles/Op", "Cycles/Enq", "Cycles/Deq"); - only_once = 1; printf(PRETTY_LINE_FMT, state.ctx->lcore_id, @@ -454,5 +453,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) state.cycles_per_deq); } else { - if (!only_once) + if (rte_atomic16_test_and_set(&display_once)) printf(CSV_HDR_FMT, "# lcore id", "Buf Size", "Burst Size", "Enqueued", @@ -460,5 +459,4 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) "Deq Retries", "Cycles/Op", "Cycles/Enq", "Cycles/Deq"); - only_once = 1; printf(CSV_LINE_FMT, state.ctx->lcore_id, diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c index 8766d6e9b..5838f8cf0 100644 --- a/app/test-crypto-perf/cperf_test_throughput.c +++ b/app/test-crypto-perf/cperf_test_throughput.c @@ -95,5 +95,5 @@ cperf_throughput_test_runner(void *test_ctx) uint32_t imix_idx = 0; - static int only_once; + static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0); struct rte_crypto_op *ops[ctx->options->max_burst_size]; @@ -262,5 +262,5 @@ cperf_throughput_test_runner(void *test_ctx) if (!ctx->options->csv) { - if (!only_once) + if (rte_atomic16_test_and_set(&display_once)) printf("%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n", "lcore id", "Buf Size", "Burst Size", @@ -268,5 +268,4 @@ cperf_throughput_test_runner(void *test_ctx) "Failed Deq", "MOps", "Gbps", "Cycles/Buf"); - only_once = 1; printf("%12u%12u%12u%12"PRIu64"%12"PRIu64"%12"PRIu64 @@ -283,10 +282,9 @@ cperf_throughput_test_runner(void *test_ctx) cycles_per_packet); } else { - if (!only_once) + if (rte_atomic16_test_and_set(&display_once)) printf("#lcore id,Buffer Size(B)," "Burst Size,Enqueued,Dequeued,Failed Enq," "Failed Deq,Ops(Millions),Throughput(Gbps)," "Cycles/Buf\n\n"); - only_once = 1; printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";" diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c index 9134b921e..2f11b73a1 100644 --- a/app/test-crypto-perf/cperf_test_verify.c +++ b/app/test-crypto-perf/cperf_test_verify.c @@ -233,5 +233,5 @@ cperf_verify_test_runner(void *test_ctx) uint64_t ops_failed = 0; - static int only_once; + static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0); uint64_t i; @@ -376,10 +376,9 @@ cperf_verify_test_runner(void *test_ctx) if (!ctx->options->csv) { - if (!only_once) + if (rte_atomic16_test_and_set(&display_once)) printf("%12s%12s%12s%12s%12s%12s%12s%12s\n\n", "lcore id", "Buf Size", "Burst size", "Enqueued", "Dequeued", "Failed Enq", "Failed Deq", "Failed Ops"); - only_once = 1; printf("%12u%12u%12u%12"PRIu64"%12"PRIu64"%12"PRIu64 @@ -394,9 +393,8 @@ cperf_verify_test_runner(void *test_ctx) ops_failed); } else { - if (!only_once) + if (rte_atomic16_test_and_set(&display_once)) printf("\n# lcore id, Buffer Size(B), " "Burst Size,Enqueued,Dequeued,Failed Enq," "Failed Deq,Failed Ops\n"); - only_once = 1; printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";" -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-08-27 09:40:12.378895974 +0100 +++ 0027-app-crypto-perf-fix-display-once-detection.patch 2019-08-27 09:40:10.911144607 +0100 @@ -1 +1 @@ -From 90e03347ca7d6d1a0e1b85d71d71ec5ae3b17a90 Mon Sep 17 00:00:00 2001 +From 0f5ef64001a86423f63a462f122acd0d546331f8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 90e03347ca7d6d1a0e1b85d71d71ec5ae3b17a90 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 0fc3a6680..62478a2df 100644 +index c9c98dc50..ec229bed2 100644 @@ -26 +27 @@ -@@ -130,5 +130,5 @@ cperf_latency_test_runner(void *arg) +@@ -129,5 +129,5 @@ cperf_latency_test_runner(void *arg) @@ -33 +34 @@ -@@ -312,5 +312,5 @@ cperf_latency_test_runner(void *arg) +@@ -311,5 +311,5 @@ cperf_latency_test_runner(void *arg) @@ -40 +41 @@ -@@ -327,5 +327,4 @@ cperf_latency_test_runner(void *arg) +@@ -326,5 +326,4 @@ cperf_latency_test_runner(void *arg) @@ -47 +48 @@ -index f08a22631..74371faa8 100644 +index c87ae7d36..1f700a3d1 100644 @@ -50 +51 @@ -@@ -392,5 +392,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) +@@ -391,5 +391,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) @@ -57 +58 @@ -@@ -438,5 +438,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) +@@ -437,5 +437,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) @@ -64 +65 @@ -@@ -444,5 +444,4 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) +@@ -443,5 +443,4 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) @@ -70 +71 @@ -@@ -455,5 +454,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) +@@ -454,5 +453,5 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) @@ -77 +78 @@ -@@ -461,5 +460,4 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) +@@ -460,5 +459,4 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx) @@ -84 +85 @@ -index 2767f4ea8..972d52088 100644 +index 8766d6e9b..5838f8cf0 100644 @@ -87 +88 @@ -@@ -96,5 +96,5 @@ cperf_throughput_test_runner(void *test_ctx) +@@ -95,5 +95,5 @@ cperf_throughput_test_runner(void *test_ctx) @@ -94 +95 @@ -@@ -263,5 +263,5 @@ cperf_throughput_test_runner(void *test_ctx) +@@ -262,5 +262,5 @@ cperf_throughput_test_runner(void *test_ctx) @@ -101 +102 @@ -@@ -269,5 +269,4 @@ cperf_throughput_test_runner(void *test_ctx) +@@ -268,5 +268,4 @@ cperf_throughput_test_runner(void *test_ctx) @@ -107 +108 @@ -@@ -284,10 +283,9 @@ cperf_throughput_test_runner(void *test_ctx) +@@ -283,10 +282,9 @@ cperf_throughput_test_runner(void *test_ctx) @@ -120 +121 @@ -index 0497cf9a1..bbdf37d05 100644 +index 9134b921e..2f11b73a1 100644 @@ -123 +124 @@ -@@ -234,5 +234,5 @@ cperf_verify_test_runner(void *test_ctx) +@@ -233,5 +233,5 @@ cperf_verify_test_runner(void *test_ctx) @@ -130 +131 @@ -@@ -377,10 +377,9 @@ cperf_verify_test_runner(void *test_ctx) +@@ -376,10 +376,9 @@ cperf_verify_test_runner(void *test_ctx) @@ -142 +143 @@ -@@ -395,9 +394,8 @@ cperf_verify_test_runner(void *test_ctx) +@@ -394,9 +393,8 @@ cperf_verify_test_runner(void *test_ctx)