From patchwork Mon Jun 24 15:02:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141582 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DA77454E2; Mon, 24 Jun 2024 17:07:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E89840E54; Mon, 24 Jun 2024 17:07:13 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 5978640653; Mon, 24 Jun 2024 17:07:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241630; x=1750777630; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=C1npxnejpOvGejv1UOZtJ/aa+RAYEj1HoFeW3TrOefc=; b=TZZHaLq2+BaZblybjP4sgjWiVomKWFb0ln7wsFfbYj0FULKWGR8RB+ml Q0SfZlPk+VHtAMmZRm3xWQNv6ItHX8CgdSdTAWQgi4BEKBkosteOxD/yk X6EHZSkM8m/mc13cfnNq2nBQ8vgRucSDfcegEuMAf76LNWx4rK5LpBah2 GvG0Ry3EEd5yvMvPdjpDFNCD4wzzQAeupQRFz82S+GSWJen1EXKT22sKV HPczkV+GMzInp3kuwMxzq8/ce89x+CabxP1Xh6q3reSr4P51SNJBQ+V7Z MEHlIWGyyB2CD1grHB3CUAS8mryqx5iDMvPhN+W0b2ENV/EQFtqbsnwpz Q==; X-CSE-ConnectionGUID: e0bw9kxaQ82UAUJgv7avaw== X-CSE-MsgGUID: vKNbxIV5QJepSTBXklGYqQ== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042009" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042009" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:08 -0700 X-CSE-ConnectionGUID: vY43tI7PTVKIYHAyZ4Ty5A== X-CSE-MsgGUID: WYPfUWn5Tv2F53Amy7ydhQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025843" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:08 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas , stable@dpdk.org Subject: [PATCH v2 1/9] test/bbdev: fix TB logic Date: Mon, 24 Jun 2024 08:02:29 -0700 Message-Id: <20240624150237.47169-2-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix discrepancy in logic when using large fake mbuf. Fixes: fd96ef3787f1 ("test/bbdev: extend support for large TB") Cc: stable@dpdk.org Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index a21c9c7bddf5..6d9bf3a233ec 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -2131,7 +2131,8 @@ validate_op_chain(struct rte_bbdev_op_data *op, uint16_t data_len = rte_pktmbuf_data_len(m) - offset; total_data_size += orig_op->segments[i].length; - if (orig_op->segments[i].length > RTE_BBDEV_LDPC_E_MAX_MBUF) + if ((orig_op->segments[i].length + RTE_PKTMBUF_HEADROOM) + > RTE_BBDEV_LDPC_E_MAX_MBUF) ignore_mbuf = true; if (!ignore_mbuf) TEST_ASSERT(orig_op->segments[i].length == data_len, From patchwork Mon Jun 24 15:02:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141581 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39FF0454E2; Mon, 24 Jun 2024 17:07:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5136540E4D; Mon, 24 Jun 2024 17:07:12 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 7F83140616; Mon, 24 Jun 2024 17:07:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241630; x=1750777630; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gZ9xFbvaaNCD10a9s1YRZB8+8QPQQ6n9z/FNRlGHhM4=; b=ZMwmjACb6lgjC9f57L0wd+ZIcljb+MFrq4XxwQBVTqrCgDjFAMep8aZN szC6eaeKBbWXnvEmE5NE2Qk0LMtVsBNpDCmLr/mLfPWBPkngA7UiCW9Qn bfSVMNMukMxHSiwMbVU+mWQP/7o5s7Sa4QrKwTWnU/xEclbCRhbPcgpm2 0u1H+FUS7Jq0pgis/ybs+rNYAdm39YkS31m1pMVFkm27NwKCpINCoLFbd VNdPzYACZzg9yiruw/k8YHLtjkLHsJy/vXNd2VWDMMnqV8TFR7fWWTEuw Q6ajSifWrMcweg5Iz49OVnRHWSZIEgJW8f0KJVaqyQBXbcfzIrHVlBOuf w==; X-CSE-ConnectionGUID: ZvQ5wct6RkO3mGkdGLyqnw== X-CSE-MsgGUID: Bln9LXfwSYS5l2YV05K1zQ== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042013" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042013" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:09 -0700 X-CSE-ConnectionGUID: /nc34p+kRkyIgUMbNSNrkQ== X-CSE-MsgGUID: 6PHetdJgRey4T2pnWc2uRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025847" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:09 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas , stable@dpdk.org Subject: [PATCH v2 2/9] test/bbdev: fix MLD output size computation Date: Mon, 24 Jun 2024 08:02:30 -0700 Message-Id: <20240624150237.47169-3-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org For perf tests, the operation size for the MLD-TS was incorrect. Fixed so that the performance numbers are correct. Largely cosmetic only. Fixes: 95f192a40e35 ("test/bbdev: add MLD cases") Cc: stable@dpdk.org Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev_perf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 6d9bf3a233ec..9841464922ac 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -94,6 +94,8 @@ #define K0_2_2 25 /* K0 fraction numerator for rv 2 and BG 2 */ #define K0_3_1 56 /* K0 fraction numerator for rv 3 and BG 1 */ #define K0_3_2 43 /* K0 fraction numerator for rv 3 and BG 2 */ +#define NUM_SC_PER_RB (12) /* Number of subcarriers in a RB in 3GPP. */ +#define BITS_PER_LLR (8) /* Number of bits in a LLR. */ #define HARQ_MEM_TOLERANCE 256 static struct test_bbdev_vector test_vector; @@ -2896,8 +2898,14 @@ calc_fft_size(struct rte_bbdev_fft_op *op) static uint32_t calc_mldts_size(struct rte_bbdev_mldts_op *op) { - uint32_t output_size; - output_size = op->mldts.num_layers * op->mldts.num_rbs * op->mldts.c_rep; + uint32_t output_size = 0; + uint16_t i; + + for (i = 0; i < op->mldts.num_layers; i++) + output_size += op->mldts.q_m[i]; + + output_size *= NUM_SC_PER_RB * BITS_PER_LLR * op->mldts.num_rbs * (op->mldts.c_rep + 1); + return output_size; } From patchwork Mon Jun 24 15:02:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141584 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9B4AA454E2; Mon, 24 Jun 2024 17:07:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEFD940EE3; Mon, 24 Jun 2024 17:07:15 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 39C6140E1F; Mon, 24 Jun 2024 17:07:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241631; x=1750777631; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZfpOpc0sn50yo5n1NYu+yrNHK9RwrycjODD4sWeyj+I=; b=S48Fn/Tj5EXytXR1K+DoOoQe36MwhvMlfdXdnVCBh76S1RgG5M30RR7A zI0DteWm+SBn7WPo9cY9HvFm7huxOnGQdQh1Yk6KWfcybGeyxCmZnGB6Z 5L2j0Rt6wGDi5L5XXNn435JP7FsO2AaQtd8x/gL4K/M24OYnIzrKMVI1u rmuAl8VLBRC/LLOKtmOle2Pw7zCDQ3uHjzz7SGyNNIIQ0gCxj4E576Lym ES77XV5D8BODn+VQhJD6sZVY6UBYJop68re66JS9OB5ts33d7a+TMruhc Gd2lgah9CCGQbRkpWZpakiOgmbISPD4B5zxverxYx2dmx9qFSyrXpIx9p g==; X-CSE-ConnectionGUID: REhquMe/Q9+LMsXD24OqRw== X-CSE-MsgGUID: elZtC2JeThi0j44CaDwg6Q== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042018" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042018" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:10 -0700 X-CSE-ConnectionGUID: VwC7Wpz2Sf6A20ggNdsPZA== X-CSE-MsgGUID: RwO3qqLtRyWiTlWwVWuKxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025852" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:09 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas , stable@dpdk.org Subject: [PATCH v2 3/9] test/bbdev: fix interrupt tests Date: Mon, 24 Jun 2024 08:02:31 -0700 Message-Id: <20240624150237.47169-4-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix possible error with regards to setting the burst size from the enqueue thread. Fixes: b2e2aec3239e ("app/bbdev: enhance interrupt test") Cc: stable@dpdk.org Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev_perf.c | 98 ++++++++++++++++---------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 9841464922ac..20cd8df19be7 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -3419,15 +3419,6 @@ throughput_intr_lcore_ldpc_dec(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; - enq = 0; - do { - enq += rte_bbdev_enqueue_ldpc_dec_ops( - tp->dev_id, - queue_id, &ops[enqueued], - num_to_enq); - } 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 @@ -3438,6 +3429,15 @@ throughput_intr_lcore_ldpc_dec(void *arg) rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, rte_memory_order_relaxed); + enq = 0; + do { + enq += rte_bbdev_enqueue_ldpc_dec_ops( + tp->dev_id, + queue_id, &ops[enqueued], + num_to_enq); + } while (unlikely(num_to_enq != enq)); + enqueued += enq; + /* Wait until processing of previous batch is * completed */ @@ -3514,14 +3514,6 @@ throughput_intr_lcore_dec(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; - enq = 0; - do { - enq += rte_bbdev_enqueue_dec_ops(tp->dev_id, - queue_id, &ops[enqueued], - num_to_enq); - } 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 @@ -3532,6 +3524,14 @@ throughput_intr_lcore_dec(void *arg) rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, rte_memory_order_relaxed); + enq = 0; + do { + enq += rte_bbdev_enqueue_dec_ops(tp->dev_id, + queue_id, &ops[enqueued], + num_to_enq); + } while (unlikely(num_to_enq != enq)); + enqueued += enq; + /* Wait until processing of previous batch is * completed */ @@ -3603,14 +3603,6 @@ throughput_intr_lcore_enc(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; - enq = 0; - do { - enq += rte_bbdev_enqueue_enc_ops(tp->dev_id, - queue_id, &ops[enqueued], - num_to_enq); - } 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 @@ -3621,6 +3613,14 @@ throughput_intr_lcore_enc(void *arg) rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, rte_memory_order_relaxed); + enq = 0; + do { + enq += rte_bbdev_enqueue_enc_ops(tp->dev_id, + queue_id, &ops[enqueued], + num_to_enq); + } while (unlikely(enq != num_to_enq)); + enqueued += enq; + /* Wait until processing of previous batch is * completed */ @@ -3694,15 +3694,6 @@ throughput_intr_lcore_ldpc_enc(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; - enq = 0; - do { - enq += rte_bbdev_enqueue_ldpc_enc_ops( - tp->dev_id, - queue_id, &ops[enqueued], - num_to_enq); - } 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 @@ -3713,6 +3704,15 @@ throughput_intr_lcore_ldpc_enc(void *arg) rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, rte_memory_order_relaxed); + enq = 0; + do { + enq += rte_bbdev_enqueue_ldpc_enc_ops( + tp->dev_id, + queue_id, &ops[enqueued], + num_to_enq); + } while (unlikely(enq != num_to_enq)); + enqueued += enq; + /* Wait until processing of previous batch is * completed */ @@ -3786,14 +3786,6 @@ throughput_intr_lcore_fft(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; - enq = 0; - do { - enq += rte_bbdev_enqueue_fft_ops(tp->dev_id, - queue_id, &ops[enqueued], - num_to_enq); - } 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 @@ -3804,6 +3796,14 @@ throughput_intr_lcore_fft(void *arg) rte_atomic_store_explicit(&tp->burst_sz, num_to_enq, rte_memory_order_relaxed); + enq = 0; + do { + enq += rte_bbdev_enqueue_fft_ops(tp->dev_id, + queue_id, &ops[enqueued], + num_to_enq); + } while (unlikely(enq != num_to_enq)); + enqueued += enq; + /* Wait until processing of previous batch is * completed */ @@ -3872,13 +3872,6 @@ throughput_intr_lcore_mldts(void *arg) if (unlikely(num_to_process - enqueued < num_to_enq)) num_to_enq = num_to_process - enqueued; - enq = 0; - do { - enq += rte_bbdev_enqueue_mldts_ops(tp->dev_id, - queue_id, &ops[enqueued], num_to_enq); - } 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 @@ -3889,6 +3882,13 @@ throughput_intr_lcore_mldts(void *arg) 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, + queue_id, &ops[enqueued], num_to_enq); + } while (unlikely(enq != num_to_enq)); + enqueued += enq; + /* Wait until processing of previous batch is * completed */ From patchwork Mon Jun 24 15:02:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141583 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BD2B3454E2; Mon, 24 Jun 2024 17:07:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDFEC40ED2; Mon, 24 Jun 2024 17:07:14 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 462E240616 for ; Mon, 24 Jun 2024 17:07:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241631; x=1750777631; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g7fA00aUXLNlfPlp3l/rHCK5Rhd5JVz2ac9L1JvScbA=; b=kowR3RO6lp0bItdr7PsiRbnycZvskvezEcvyl3O6yL/dl7lAbbndDf62 l6vD4+nbC1MBnkSEkRWOzpaGmlTg5UiK/u0gcfJcxv5M/Do/XU2ViCxK+ cARganx+chqsNuIbD8EJJ5RYYo1pULqSegw6peE1gwrDk9LTE6xWT64Ze n2SiNrt3BTahUJ2za52HyyIvQi380BAwninh7jJUN6pBEWZBRPYg6zPci hFp1qNz50tYYvIfIJg2k0TwhDgcuDaYPqxL5NBVeaAxAo4uT9QXiV7YGK h8sDOGTWQ/pS/6aiWhfI7HPEEBKtGi2Yymb3cTFEixbIrzxkGp4hx9CoV g==; X-CSE-ConnectionGUID: gXVWGgUlQoSP/2cO6HisrA== X-CSE-MsgGUID: wC6nklZ7SJW7AgJSUqp3Tg== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042021" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042021" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:10 -0700 X-CSE-ConnectionGUID: YfW2gEHgTty4XMusxsI20g== X-CSE-MsgGUID: 8yoCivlUQcu7UhRUlHdqvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025859" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:10 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v2 4/9] test/bbdev: change iter-max argument Date: Mon, 24 Jun 2024 08:02:32 -0700 Message-Id: <20240624150237.47169-5-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org -t --iter-max used for max number of iterations. -T --timeout used for test timeout value. Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test-bbdev.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py index 65a34390548d..9ddca9e78d3b 100755 --- a/app/test-bbdev/test-bbdev.py +++ b/app/test-bbdev/test-bbdev.py @@ -27,16 +27,10 @@ def kill(process): parser.add_argument("-e", "--eal-params", help="EAL arguments which must be passed to the test app", default="--vdev=baseband_null0 -a00:00.0") -# Until deprecated in next release keep -t as an valid argument for timeout, then use -T -parser.add_argument("-t", "--timeout", +parser.add_argument("-T", "--timeout", type=int, help="Timeout in seconds", default=600) -# This will become -t option for iter_max in next release -parser.add_argument("--iter-max", - type=int, - help="Max iterations", - default=6) parser.add_argument("-c", "--test-cases", nargs="+", help="Defines test cases to run. Run all if not specified") @@ -58,6 +52,10 @@ def kill(process): type=int, help="SNR in dB for BLER tests", default=0) +parser.add_argument("-t", "--iter-max", + type=int, + help="Max iterations", + default=6) parser.add_argument("-l", "--num-lcores", type=int, help="Number of lcores to run.", @@ -83,10 +81,6 @@ def kill(process): if args.iter_max: params.extend(["-t", str(args.iter_max)]) - print("The argument for iter_max will be -t in next release") - -if args.timeout: - print("The argument for timeout will be -T in next release") if args.num_ops: params.extend(["-n", str(args.num_ops)]) From patchwork Mon Jun 24 15:02:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141585 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FC0D454E2; Mon, 24 Jun 2024 17:07:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F155740EE7; Mon, 24 Jun 2024 17:07:16 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 9710A40653 for ; Mon, 24 Jun 2024 17:07:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241631; x=1750777631; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MfNZcjzCf2XEPJJi83/sPPhvJCJIzdivPFOk7VgWOGI=; b=a4q8x/7iEnFtCtzGwlNpkoPHg5nrnyyTAILLq6+wV8C1nZIaHKVcudQ3 QSW0afzJfcKPCeyDJ+/krmdQhj9sbG+bELJkyY4/ErPr5Y/R1Cq0aC5uB F6P4hwSyAcag65xbbsJ4mxbfW2IiGFCYCNWmpCWaYVd2gfHVBGBVMTGo8 fLOFDodNIQ+aVmL2+SKdW/Vofys6rItySuPbqL9Rb7A5QRk6HMrSMAns/ 9xbgee5vf8Xgw8hH/Nm8txt2eJ0gUg3Q5j3ZcXAuFeASFW4fpwaYLCKuq AzuiGitozmpExuoO916ByLwsnZfDC3WRwwkB+yYTNoTN7wMuOLG2GRgZ8 g==; X-CSE-ConnectionGUID: c6nFn+MGRsiCpwKXMIElNg== X-CSE-MsgGUID: ih0A+wkkRq2SxLekL73LDA== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042024" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042024" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:11 -0700 X-CSE-ConnectionGUID: aq1yTAyIQBel0YuUUclDDg== X-CSE-MsgGUID: MLxCNpZ9SqqdMWrJtZ3dnw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025863" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:10 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v2 5/9] test/bbdev: improve timeout message format Date: Mon, 24 Jun 2024 08:02:33 -0700 Message-Id: <20240624150237.47169-6-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Print more info and format message for test timeouts. No functional impact. Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test-bbdev.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py index 9ddca9e78d3b..d5b679f7867f 100755 --- a/app/test-bbdev/test-bbdev.py +++ b/app/test-bbdev/test-bbdev.py @@ -108,15 +108,29 @@ def kill(process): try: output = subprocess.run(call_params, timeout=args.timeout, universal_newlines=True) except subprocess.TimeoutExpired as e: + print("===========================================================") print("Starting Test Suite : BBdev TimeOut Tests") + print("INFO: One of the tests timed out {}".format(e)) + print("INFO: Unexpected Error") + print("+ ------------------------------------------------------- +") print("== test: timeout") - print("TestCase [ 0] : timeout passed") - print(" + Tests Failed : 1") print("Unexpected Error") + print("TestCase [ 0] : timeout failed") + print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +") + print(" + Tests Failed : 1") + print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +") + exit_status = 1 if output.returncode < 0: + print("===========================================================") print("Starting Test Suite : BBdev Exception Tests") + print("INFO: One of the tests returned {}".format(output.returncode)) + print("INFO: Unexpected Error") + print("+ ------------------------------------------------------- +") print("== test: exception") - print("TestCase [ 0] : exception passed") - print(" + Tests Failed : 1") print("Unexpected Error") + print("TestCase [ 0] : exception failed") + print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +") + print(" + Tests Failed : 1") + print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +") + exit_status = 1 sys.exit(exit_status) From patchwork Mon Jun 24 15:02:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141586 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46329454E2; Mon, 24 Jun 2024 17:07:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E195E410D0; Mon, 24 Jun 2024 17:07:17 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 09E5640E30 for ; Mon, 24 Jun 2024 17:07:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241632; x=1750777632; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6k367TWHmQVOgvD0jBdmNX69u18ltXRhWKGwfP39VOg=; b=NYv/mKNygvc8gY8Oi1SlQHPb2xUKk0Zib/aHQ2KaeqDfGbtYCuovFqEL TaILsSlPj1/q21GVqHLV2fL0pt2CIECam2b6klbcM+9Oj+WSkEFWykTG5 vBb4PgapeJ5uQrf8DJRM+40XTXlyHpI7NG/qhZWNWLfG7XaS1xWuLTvFA h3gf2wtPmWSaqQcaGuSzoaQyQM8T/4Jrtj4Cr+Fi4zcqOcei2wBZo5EDC jpxJa3J2K+XUhLthZ7alyRm0m24Cn6FZJeXHiNsqrSj3x/9Aga95fft2t 7Lt5Mt8e4dpR2aij0ZkxrcORkxQ+zo/n/LcGif912PKF255FEeSrU7pWD g==; X-CSE-ConnectionGUID: e6KEyViaTFGb189mzN8RIw== X-CSE-MsgGUID: jIbnyw1qS0CwzDiPewXADw== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042027" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042027" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:11 -0700 X-CSE-ConnectionGUID: vFIQQ3mcSouIXyYnRADfhQ== X-CSE-MsgGUID: pIJj4SrPQaiXoObzX7BGEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025869" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:11 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v2 6/9] test/bbdev: add soft output parsing capability Date: Mon, 24 Jun 2024 08:02:34 -0700 Message-Id: <20240624150237.47169-7-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add vector parsing capability for soft output vectors. Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev_vector.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c index 42fa630041e9..b3e9d4bb7504 100644 --- a/app/test-bbdev/test_bbdev_vector.c +++ b/app/test-bbdev/test_bbdev_vector.c @@ -837,6 +837,10 @@ parse_ldpc_decoder_params(const char *key_token, char *token, ret = parse_data_entry(key_token, token, vector, DATA_HARQ_OUTPUT, op_data_prefixes[DATA_HARQ_OUTPUT]); + else if (starts_with(key_token, op_data_prefixes[DATA_SOFT_OUTPUT])) + ret = parse_data_entry(key_token, token, vector, + DATA_SOFT_OUTPUT, + op_data_prefixes[DATA_SOFT_OUTPUT]); else if (!strcmp(key_token, "e")) { vector->mask |= TEST_BBDEV_VF_E; ldpc_dec->cb_params.e = (uint32_t) strtoul(token, &err, 0); From patchwork Mon Jun 24 15:02:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141587 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D250A454E2; Mon, 24 Jun 2024 17:07:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32EAF410F2; Mon, 24 Jun 2024 17:07:20 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id A37FD40E1F for ; Mon, 24 Jun 2024 17:07:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241632; x=1750777632; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RzKlIGuxc4IKrnzLMeTBsD94po3lIVqM5QIAoFsg0qs=; b=gtrODXf8ZiEmKMbzy8RfFfeUWY600UNlAAhIsdkKAeQB8jC0qhzGzBHJ DHBufhKQxVu1t6f1Z4ErbqWaHEH8PA1aEvAJqWj5QEubBDvdFx9PyuzNE qCnQDamKUK5Bi9Ko+PYZGLaR51MgmQudnEXignM+1/WCf0bUZUKbZf732 la94h9OXkFTP61K/+ZHMd2a43BHVCHy3/aeC4//STUQPICqmdXDYyzoqF 30TBWpxz3tTe3N/uXzXik7MppPdsbRi9za4OF+gF61J8wOLEmZlB+d10j 8IF0mxvPgXcVz2oEihZGU/k2R0N43IFMtM0Ac+p6bsgugyaHd9Tj6jA8L w==; X-CSE-ConnectionGUID: 5sXBIMofT+iJBVgJpZj+CQ== X-CSE-MsgGUID: 9f7Hq27JSi+8bgXN3FReWA== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042031" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042031" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:12 -0700 X-CSE-ConnectionGUID: kkpr3C6USvC37sQmxhbveA== X-CSE-MsgGUID: Fcwf6N8qSka7l9BUBLjwqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025872" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:11 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v2 7/9] test/bbdev: check assumptions on fft window Date: Mon, 24 Jun 2024 08:02:35 -0700 Message-Id: <20240624150237.47169-8-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add check for FFT window width. Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev_perf.c | 26 ++++++++++++++++++++++---- app/test-bbdev/test_bbdev_vector.c | 14 ++++++++++++++ app/test-bbdev/test_bbdev_vector.h | 2 ++ 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 20cd8df19be7..7c414ab360a8 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -108,6 +108,8 @@ static int ldpc_llr_decimals; static int ldpc_llr_size; /* Keep track of the LDPC decoder device capability flag */ static uint32_t ldpc_cap_flags; +/* FFT window width predefined on device and on vector. */ +static int fft_window_width_dev; /* Represents tested active devices */ static struct active_device { @@ -883,6 +885,13 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, rte_bbdev_info_get(dev_id, info); if (info->drv.device_status == RTE_BBDEV_DEV_FATAL_ERR) printf("Device Status %s\n", rte_bbdev_device_status_str(info->drv.device_status)); + if (info->drv.fft_window_width != NULL) + fft_window_width_dev = info->drv.fft_window_width[0]; + else + fft_window_width_dev = 0; + if (fft_window_width_dev != 0) + printf(" FFT Window0 width %d\n", fft_window_width_dev); + nb_queues = RTE_MIN(rte_lcore_count(), info->drv.max_num_queues); nb_queues = RTE_MIN(nb_queues, (unsigned int) MAX_QUEUES); @@ -2585,7 +2594,8 @@ validate_ldpc_enc_op(struct rte_bbdev_enc_op **ops, const uint16_t n, } static inline int -validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op) +validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op, + bool skip_validate_output) { struct rte_mbuf *m = op->data; uint8_t i, nb_dst_segments = orig_op->nb_segments; @@ -2615,7 +2625,7 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig abs_delt = delt > 0 ? delt : -delt; error_num += (abs_delt > thres_hold ? 1 : 0); } - if (error_num > 0) { + if ((error_num > 0) && !skip_validate_output) { rte_memdump(stdout, "Buffer A", ref_out, data_len); rte_memdump(stdout, "Buffer B", op_out, data_len); TEST_ASSERT(error_num == 0, @@ -2688,16 +2698,24 @@ validate_fft_op(struct rte_bbdev_fft_op **ops, const uint16_t n, int ret; struct op_data_entries *fft_data_orig = &test_vector.entries[DATA_HARD_OUTPUT]; struct op_data_entries *fft_pwr_orig = &test_vector.entries[DATA_SOFT_OUTPUT]; + bool skip_validate_output = false; + + if ((test_vector.fft_window_width_vec > 0) && + (test_vector.fft_window_width_vec != fft_window_width_dev)) { + printf("The vector FFT width doesn't match with device - skip %d %d\n", + test_vector.fft_window_width_vec, fft_window_width_dev); + skip_validate_output = true; + } for (i = 0; i < n; ++i) { ret = check_fft_status_and_ordering(ops[i], i, ref_op->status); TEST_ASSERT_SUCCESS(ret, "Checking status and ordering for FFT failed"); TEST_ASSERT_SUCCESS(validate_op_fft_chain( - &ops[i]->fft.base_output, fft_data_orig), + &ops[i]->fft.base_output, fft_data_orig, skip_validate_output), "FFT Output buffers (op=%u) are not matched", i); if (check_bit(ops[i]->fft.op_flags, RTE_BBDEV_FFT_POWER_MEAS)) TEST_ASSERT_SUCCESS(validate_op_fft_chain( - &ops[i]->fft.power_meas_output, fft_pwr_orig), + &ops[i]->fft.power_meas_output, fft_pwr_orig, skip_validate_output), "FFT Power Output buffers (op=%u) are not matched", i); } diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c index b3e9d4bb7504..e48947b211ac 100644 --- a/app/test-bbdev/test_bbdev_vector.c +++ b/app/test-bbdev/test_bbdev_vector.c @@ -1050,6 +1050,20 @@ parse_fft_params(const char *key_token, char *token, } } ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; + } else if (!strcmp(key_token, "fft_window_width")) { + tok = strtok(token, VALUE_DELIMITER); + if (tok == NULL) + return -1; + for (i = 0; i < FFT_WIN_SIZE; i++) { + if (i == 0) + vector->fft_window_width_vec = (uint32_t) strtoul(tok, &err, 0); + if (i < (FFT_WIN_SIZE - 1)) { + tok = strtok(NULL, VALUE_DELIMITER); + if (tok == NULL) + return -1; + } + } + ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; } else if (!strcmp(key_token, "op_flags")) { vector->mask |= TEST_BBDEV_VF_OP_FLAGS; ret = parse_turbo_flags(token, &op_flags, vector->op_type); diff --git a/app/test-bbdev/test_bbdev_vector.h b/app/test-bbdev/test_bbdev_vector.h index 14b8ef2764ad..ba1d0d20f9ea 100644 --- a/app/test-bbdev/test_bbdev_vector.h +++ b/app/test-bbdev/test_bbdev_vector.h @@ -69,6 +69,8 @@ struct test_bbdev_vector { }; /* Additional storage for op data entries */ struct op_data_entries entries[DATA_NUM_TYPES]; + /* Vector FFT window width assumption. */ + uint16_t fft_window_width_vec; }; /* fills test vector parameters based on test file */ From patchwork Mon Jun 24 15:02:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141588 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9A1EE454E2; Mon, 24 Jun 2024 17:08:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53A1D41104; Mon, 24 Jun 2024 17:07:21 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 3706F40A6E for ; Mon, 24 Jun 2024 17:07:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241633; x=1750777633; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZIFowcc829MXQU495wUmrP8EEtUX8yNtfNepdjAgDAQ=; b=hkqgbiveBxY6wSIDQ9IcxS2JkAn0B8/AXTxO4lCVh9cmGYN5mDZOY7Es XYYcBvCHu0Z21/CwI+v6Evy8O4fQPsIKuLZP0Jo5aGjgjsqQ/rKnx99+x CzCSCRKI2Qttuvhf/8/L2a1pOU9Q33XPN+uaiXucpzh98Ttzk8CB6vBQu z/VKhnHsGwAr2QYqnEilKszZoqC0/ARoKs0lQYx8YRAQ8LINGvE5N5Mkr NUJX5afsQvTEROMN7iNxGp8hpxiDJI+OELCVd6Iwq6sXLvJxh0ephfXBd AD6aizmSOHUfiyyC1q5Pc7QuDzu5gIhb0NSfRD4j4TP1+b8hgEjGZFLRb w==; X-CSE-ConnectionGUID: sKHAGxfDQ7SawxZQEKKOJw== X-CSE-MsgGUID: ElonrMJ/Qv+TM4yeXe7CqA== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042046" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042046" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:12 -0700 X-CSE-ConnectionGUID: oD+LRLQ/Qc25K97DyTIC0A== X-CSE-MsgGUID: BirApNhjRduu2xPWjj/GZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025877" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:12 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v2 8/9] test/bbdev: update fft measurement output Date: Mon, 24 Jun 2024 08:02:36 -0700 Message-Id: <20240624150237.47169-9-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Update check for FFT measurement output to better account for tolerance. Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev_perf.c | 52 +++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 7c414ab360a8..3a94f15a30b8 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -2639,6 +2639,56 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig return TEST_SUCCESS; } +static inline int +validate_op_fft_meas_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op, + bool skip_validate_output) +{ + struct rte_mbuf *m = op->data; + uint8_t i, nb_dst_segments = orig_op->nb_segments; + double thres_hold = 1.0; + uint32_t j, data_len_iq, error_num; + int32_t *ref_out, *op_out; + double estSNR, refSNR, delt, abs_delt; + + TEST_ASSERT(nb_dst_segments == m->nb_segs, + "Number of segments differ in original (%u) and filled (%u) op fft", + nb_dst_segments, m->nb_segs); + + /* Due to size limitation of mbuf, FFT doesn't use real mbuf. */ + for (i = 0; i < nb_dst_segments; ++i) { + uint16_t offset = (i == 0) ? op->offset : 0; + uint32_t data_len = op->length; + + TEST_ASSERT(orig_op->segments[i].length == data_len, + "Length of segment differ in original (%u) and filled (%u) op fft", + orig_op->segments[i].length, data_len); + + /* Divided by 4 to get the number of 32 bits data. */ + data_len_iq = data_len >> 2; + ref_out = (int32_t *)(orig_op->segments[i].addr); + op_out = rte_pktmbuf_mtod_offset(m, int32_t *, offset); + error_num = 0; + for (j = 0; j < data_len_iq; j++) { + estSNR = 10*log10(op_out[j]); + refSNR = 10*log10(ref_out[j]); + delt = refSNR - estSNR; + abs_delt = delt > 0 ? delt : -delt; + error_num += (abs_delt > thres_hold ? 1 : 0); + } + if ((error_num > 0) && !skip_validate_output) { + rte_memdump(stdout, "Buffer A", ref_out, data_len); + rte_memdump(stdout, "Buffer B", op_out, data_len); + TEST_ASSERT(error_num == 0, + "FFT Output are not matched total (%u) errors (%u)", + data_len_iq, error_num); + } + + m = m->next; + } + + return TEST_SUCCESS; +} + static inline int validate_op_mldts_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op) @@ -2714,7 +2764,7 @@ validate_fft_op(struct rte_bbdev_fft_op **ops, const uint16_t n, &ops[i]->fft.base_output, fft_data_orig, skip_validate_output), "FFT Output buffers (op=%u) are not matched", i); if (check_bit(ops[i]->fft.op_flags, RTE_BBDEV_FFT_POWER_MEAS)) - TEST_ASSERT_SUCCESS(validate_op_fft_chain( + TEST_ASSERT_SUCCESS(validate_op_fft_meas_chain( &ops[i]->fft.power_meas_output, fft_pwr_orig, skip_validate_output), "FFT Power Output buffers (op=%u) are not matched", i); } From patchwork Mon Jun 24 15:02:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hernan Vargas X-Patchwork-Id: 141589 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43368454E2; Mon, 24 Jun 2024 17:08:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 551BF40ED1; Mon, 24 Jun 2024 17:07:22 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id A283540E1F for ; Mon, 24 Jun 2024 17:07:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719241633; x=1750777633; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vdaNCJjamP71FRj0u+1JUcPOyObpdl0XimYuzdsx7mA=; b=mV4NsRYJLwKbzYqqIkHxF1VsU/BDTG/a83PZ+5gvaUvVY/C8PN5a0ORN cN0lncCEb/0qk+a+8S2wWtHYaenThKNItup9WOANDhTFXUu6K9Y91Yjym /lflg8bPxmigrH0HCNyXHxEsoZGYTa0oIwMTZli8DlEy6hB7oMcGFHZkp TYyLKwcKOETg/DVV+k1X0BS1Bfaq8EQGrhswWlKidyRDNaShoMWsS4GcQ J1Z5xHsJjt8IDyyEX0SgJw6XDbPR6RZ8fTE/mpNLmtaNwK54g8kqAUY9+ DjKE/Gj0SZZ0NwIlq5FJp/6t0X3h2XgJyqppSFdG+C2cVW2/+DQxjDK1b w==; X-CSE-ConnectionGUID: f7IiJIzTSHKGTnBkf3hIHw== X-CSE-MsgGUID: 8ottfuQyQLyXUPSaW9vXvw== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16042056" X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="16042056" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 08:07:12 -0700 X-CSE-ConnectionGUID: TWJw45s/QjOlbxEY0+zFLg== X-CSE-MsgGUID: KUqhOUA5S46itMtAKZT8sQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,262,1712646000"; d="scan'208";a="44025882" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 24 Jun 2024 08:07:12 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v2 9/9] test/bbdev: remove unnecessary line Date: Mon, 24 Jun 2024 08:02:37 -0700 Message-Id: <20240624150237.47169-10-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240624150237.47169-1-hernan.vargas@intel.com> References: <20240624150237.47169-1-hernan.vargas@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove unnecesary line of code. No functional impact. Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c index cf224dca5d04..0bbce6ca923b 100644 --- a/app/test-bbdev/test_bbdev.c +++ b/app/test-bbdev/test_bbdev.c @@ -1239,7 +1239,6 @@ test_bbdev_invalid_driver(void) TEST_ASSERT_SUCCESS(rte_bbdev_callback_unregister(dev_id, RTE_BBDEV_EVENT_UNKNOWN, event_callback, NULL), "Failed to unregister RTE_BBDEV_EVENT_ERROR "); - dev2->dev_ops = dev1.dev_ops; /* Tests for rte_bbdev_stats_reset */ dev2->dev_ops = NULL;