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 3A193455AD for ; Mon, 15 Jul 2024 17:27:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 359AB402DD; Mon, 15 Jul 2024 17:27:14 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 80BE0402B0 for ; Mon, 15 Jul 2024 17:27:12 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4277a5ed48bso32686375e9.2 for ; Mon, 15 Jul 2024 08:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057232; x=1721662032; darn=dpdk.org; 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=YBBZlO3R/XbDyf/SdffAg2/5/43ahQUjhFk2ZeK27Co=; b=gYpY9GoddVBA0e34CWOuz7BKyEyuJ4CYf8kxLjpvtaG/hvflXUvdYOwS6bGAeXPa6S B271UBrfIdPU2dwtaTWrc9Prnp03daibGnAI3XcpfevwDMQfjT08zskk3ESi4Lrd9v9I TOVg3JD1xX4bMzW56EdtAoSbIIqSo2dnZ3kxEQAe2zCpmcfSkkmkVLj4SFhpxl+GQQlZ Zq3asWItegn9n6STyetD6SvlEJZU4sqw+mOOX1sH3b6kUGoQFM8OTayBgMHOLcSVmZIl 64Skgi/B6hrcUmqEQy2omca+Uv7onOsIAw54dc9Ho91VRgE9zDYtaoFwv7LJY9fsKon7 3yFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057232; x=1721662032; 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=YBBZlO3R/XbDyf/SdffAg2/5/43ahQUjhFk2ZeK27Co=; b=b+OawD5Qqpk1/HSfDF40o84POYMrSL1oZzd1fe63OTqwkaIq/LMr8JYwysqf9x4N+U bg4ybTiR80Ovc9QyzbBRq90d4YrnlbJ+Ssuw0wceZkloY+RiYR+XVORMJ4BgW+pcAzUL pcx30Q7yAOk87EJmus17H/fupsaDZ2rH8lCPc9p8Bv0W4gXdOqEG53t3rddcELDDZBZG QPEmKmf6z0hNVU8F9xhH5QSvQTeBBQ/3zSuyblQDLL4DHzh1RS9se6qxmQbUfy2LOrrG dJO/hspyzozRoE3ht0uzSfvbXJ67i2woJivjOMuHqWq5sYQuDmjDKN2U31eC3O01AkkF Q70A== X-Forwarded-Encrypted: i=1; AJvYcCWFm4G7GPM6yh30kX1haY6M67/FTbT76lrGAe5k8vYSZTSo5WPilCOCtY3a3jaO1HDlsCXeR1eiw0Jldhy7lcE= X-Gm-Message-State: AOJu0YzfL4JNYShevD0Y4hQD/CHEWMwA6e9SYlXg4B8w44AuOYpVqSBQ iy4fwY6xBMOkiK9OX5iLaGnhIaTlCuptNH+GpNWv2skNHCzdfHGwmzOBebZg X-Google-Smtp-Source: AGHT+IF7GWbgRWKOQ0a93SxiIFBRR4S+Gj2uT8J4H9a161fBsBebOyL1uWnA+oocGqAkJ0rXd9SuvQ== X-Received: by 2002:a05:600c:2284:b0:426:5e91:391e with SMTP id 5b1f17b1804b1-426707f81a5mr121795585e9.26.1721057232085; Mon, 15 Jul 2024 08:27:12 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-426725597bdsm147011905e9.0.2024.07.15.08.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:27:11 -0700 (PDT) From: luca.boccassi@gmail.com To: Hernan Vargas Cc: Maxime Coquelin , dpdk stable Subject: patch 'app/bbdev: fix interrupt tests' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:25:41 +0100 Message-Id: <20240715152704.2229503-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-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 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/24. 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/cdb1114156bfa7a8893904ad0368a312591428f0 Thanks. Luca Boccassi --- >From cdb1114156bfa7a8893904ad0368a312591428f0 Mon Sep 17 00:00:00 2001 From: Hernan Vargas Date: Mon, 24 Jun 2024 08:02:31 -0700 Subject: [PATCH] app/bbdev: fix interrupt tests [ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ] Fix possible error with regards to setting the burst size from the enqueue thread. Fixes: b2e2aec3239e ("app/bbdev: enhance interrupt test") Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev_perf.c | 90 ++++++++++++++++---------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index f77ebc4b47..66d14ff502 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -3125,6 +3125,15 @@ throughput_intr_lcore_ldpc_dec(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; + /* Write to thread burst_sz current number of enqueued + * descriptors. It ensures that proper number of + * descriptors will be dequeued in callback + * function - needed for last batch in case where + * the number of operations is not a multiple of + * burst size. + */ + __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); + enq = 0; do { enq += rte_bbdev_enqueue_ldpc_dec_ops( @@ -3134,15 +3143,6 @@ throughput_intr_lcore_ldpc_dec(void *arg) } while (unlikely(num_to_enq != enq)); enqueued += enq; - /* Write to thread burst_sz current number of enqueued - * descriptors. It ensures that proper number of - * descriptors will be dequeued in callback - * function - needed for last batch in case where - * the number of operations is not a multiple of - * burst size. - */ - __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); - /* Wait until processing of previous batch is * completed */ @@ -3218,6 +3218,15 @@ throughput_intr_lcore_dec(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; + /* Write to thread burst_sz current number of enqueued + * descriptors. It ensures that proper number of + * descriptors will be dequeued in callback + * function - needed for last batch in case where + * the number of operations is not a multiple of + * burst size. + */ + __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); + enq = 0; do { enq += rte_bbdev_enqueue_dec_ops(tp->dev_id, @@ -3226,15 +3235,6 @@ throughput_intr_lcore_dec(void *arg) } while (unlikely(num_to_enq != enq)); enqueued += enq; - /* Write to thread burst_sz current number of enqueued - * descriptors. It ensures that proper number of - * descriptors will be dequeued in callback - * function - needed for last batch in case where - * the number of operations is not a multiple of - * burst size. - */ - __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); - /* Wait until processing of previous batch is * completed */ @@ -3304,6 +3304,15 @@ throughput_intr_lcore_enc(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; + /* Write to thread burst_sz current number of enqueued + * descriptors. It ensures that proper number of + * descriptors will be dequeued in callback + * function - needed for last batch in case where + * the number of operations is not a multiple of + * burst size. + */ + __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); + enq = 0; do { enq += rte_bbdev_enqueue_enc_ops(tp->dev_id, @@ -3312,15 +3321,6 @@ throughput_intr_lcore_enc(void *arg) } while (unlikely(enq != num_to_enq)); enqueued += enq; - /* Write to thread burst_sz current number of enqueued - * descriptors. It ensures that proper number of - * descriptors will be dequeued in callback - * function - needed for last batch in case where - * the number of operations is not a multiple of - * burst size. - */ - __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); - /* Wait until processing of previous batch is * completed */ @@ -3392,6 +3392,15 @@ throughput_intr_lcore_ldpc_enc(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; + /* Write to thread burst_sz current number of enqueued + * descriptors. It ensures that proper number of + * descriptors will be dequeued in callback + * function - needed for last batch in case where + * the number of operations is not a multiple of + * burst size. + */ + __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); + enq = 0; do { enq += rte_bbdev_enqueue_ldpc_enc_ops( @@ -3401,15 +3410,6 @@ throughput_intr_lcore_ldpc_enc(void *arg) } while (unlikely(enq != num_to_enq)); enqueued += enq; - /* Write to thread burst_sz current number of enqueued - * descriptors. It ensures that proper number of - * descriptors will be dequeued in callback - * function - needed for last batch in case where - * the number of operations is not a multiple of - * burst size. - */ - __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); - /* Wait until processing of previous batch is * completed */ @@ -3480,6 +3480,15 @@ throughput_intr_lcore_fft(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; + /* Write to thread burst_sz current number of enqueued + * descriptors. It ensures that proper number of + * descriptors will be dequeued in callback + * function - needed for last batch in case where + * the number of operations is not a multiple of + * burst size. + */ + __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); + enq = 0; do { enq += rte_bbdev_enqueue_fft_ops(tp->dev_id, @@ -3488,15 +3497,6 @@ throughput_intr_lcore_fft(void *arg) } while (unlikely(enq != num_to_enq)); enqueued += enq; - /* Write to thread burst_sz current number of enqueued - * descriptors. It ensures that proper number of - * descriptors will be dequeued in callback - * function - needed for last batch in case where - * the number of operations is not a multiple of - * burst size. - */ - __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); - /* Wait until processing of previous batch is * completed */ -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:34.931310201 +0100 +++ 0003-app-bbdev-fix-interrupt-tests.patch 2024-07-15 16:19:34.440203731 +0100 @@ -1 +1 @@ -From fdcee665c5066cd1300d08b85d159ccabf9f3657 Mon Sep 17 00:00:00 2001 +From cdb1114156bfa7a8893904ad0368a312591428f0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15,2 +16,2 @@ - app/test-bbdev/test_bbdev_perf.c | 120 +++++++++++++++---------------- - 1 file changed, 60 insertions(+), 60 deletions(-) + app/test-bbdev/test_bbdev_perf.c | 90 ++++++++++++++++---------------- + 1 file changed, 45 insertions(+), 45 deletions(-) @@ -19 +20 @@ -index 9841464922..20cd8df19b 100644 +index f77ebc4b47..66d14ff502 100644 @@ -22 +23 @@ -@@ -3419,6 +3419,16 @@ throughput_intr_lcore_ldpc_dec(void *arg) +@@ -3125,6 +3125,15 @@ throughput_intr_lcore_ldpc_dec(void *arg) @@ -33,2 +34 @@ -+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -+ rte_memory_order_relaxed); ++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -39 +39 @@ -@@ -3428,16 +3438,6 @@ throughput_intr_lcore_ldpc_dec(void *arg) +@@ -3134,15 +3143,6 @@ throughput_intr_lcore_ldpc_dec(void *arg) @@ -50,2 +50 @@ -- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -- rte_memory_order_relaxed); +- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -56 +55 @@ -@@ -3514,6 +3514,16 @@ throughput_intr_lcore_dec(void *arg) +@@ -3218,6 +3218,15 @@ throughput_intr_lcore_dec(void *arg) @@ -67,2 +66 @@ -+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -+ rte_memory_order_relaxed); ++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -73 +71 @@ -@@ -3522,16 +3532,6 @@ throughput_intr_lcore_dec(void *arg) +@@ -3226,15 +3235,6 @@ throughput_intr_lcore_dec(void *arg) @@ -84,2 +82 @@ -- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -- rte_memory_order_relaxed); +- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -90 +87 @@ -@@ -3603,6 +3603,16 @@ throughput_intr_lcore_enc(void *arg) +@@ -3304,6 +3304,15 @@ throughput_intr_lcore_enc(void *arg) @@ -101,2 +98 @@ -+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -+ rte_memory_order_relaxed); ++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -107 +103 @@ -@@ -3611,16 +3621,6 @@ throughput_intr_lcore_enc(void *arg) +@@ -3312,15 +3321,6 @@ throughput_intr_lcore_enc(void *arg) @@ -118,2 +114 @@ -- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -- rte_memory_order_relaxed); +- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -124 +119 @@ -@@ -3694,6 +3694,16 @@ throughput_intr_lcore_ldpc_enc(void *arg) +@@ -3392,6 +3392,15 @@ throughput_intr_lcore_ldpc_enc(void *arg) @@ -135,2 +130 @@ -+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -+ rte_memory_order_relaxed); ++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -141 +135 @@ -@@ -3703,16 +3713,6 @@ throughput_intr_lcore_ldpc_enc(void *arg) +@@ -3401,15 +3410,6 @@ throughput_intr_lcore_ldpc_enc(void *arg) @@ -152,2 +146 @@ -- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -- rte_memory_order_relaxed); +- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -158 +151 @@ -@@ -3786,6 +3786,16 @@ throughput_intr_lcore_fft(void *arg) +@@ -3480,6 +3480,15 @@ throughput_intr_lcore_fft(void *arg) @@ -169,2 +162 @@ -+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -+ rte_memory_order_relaxed); ++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED); @@ -175,35 +167 @@ -@@ -3794,16 +3804,6 @@ throughput_intr_lcore_fft(void *arg) - } while (unlikely(enq != num_to_enq)); - enqueued += enq; - -- /* Write to thread burst_sz current number of enqueued -- * descriptors. It ensures that proper number of -- * descriptors will be dequeued in callback -- * function - needed for last batch in case where -- * the number of operations is not a multiple of -- * burst size. -- */ -- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -- rte_memory_order_relaxed); -- - /* Wait until processing of previous batch is - * completed - */ -@@ -3872,6 +3872,16 @@ throughput_intr_lcore_mldts(void *arg) - if (unlikely(num_to_process - enqueued < num_to_enq)) - num_to_enq = num_to_process - enqueued; - -+ /* Write to thread burst_sz current number of enqueued -+ * descriptors. It ensures that proper number of -+ * descriptors will be dequeued in callback -+ * function - needed for last batch in case where -+ * the number of operations is not a multiple of -+ * burst size. -+ */ -+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -+ rte_memory_order_relaxed); -+ - enq = 0; - do { - enq += rte_bbdev_enqueue_mldts_ops(tp->dev_id, -@@ -3879,16 +3889,6 @@ throughput_intr_lcore_mldts(void *arg) +@@ -3488,15 +3497,6 @@ throughput_intr_lcore_fft(void *arg) @@ -220,2 +178 @@ -- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, -- rte_memory_order_relaxed); +- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);