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 713BE41DB8; Thu, 2 Mar 2023 21:22:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CED7C42D37; Thu, 2 Mar 2023 21:22:05 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id AD02742B8B for ; Thu, 2 Mar 2023 21:22:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677788520; x=1709324520; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2hwIDTaDFpJFllJ2kG1dO8q530Mgcw/990sSV7dl/O4=; b=a/VmKVQ7k3GDCdpu8yX+DBI8gwrWAP0SzZo+80//UsO6dZfVbiQHKwt6 WyUiESFAymsh3bCmyv8blbJIn/DMOAD8hWf4SICyceP19gHuMIaT97Q5u scfChdWnWQLyboA+ufa3vfI8QH1P4zK/y0oBudwSrW1/QcR/fZH8oILNW NNb3JZ4glVeuHvGNohyTcAdpmHQQjzsiRmugSpTPTiO6tYH2e93qRfVom Rdnrgd4Zt3MX7IV6U20TeOrnaIndNvBNTWU1I9MtU8KVb81DJBufClZ03 uhhg5QIw47X0z79POtvdPdYPb5WAv5U7ZZXdiiL+pYe6AbyfecsX0g3Mm A==; X-IronPort-AV: E=McAfee;i="6500,9779,10637"; a="334871177" X-IronPort-AV: E=Sophos;i="5.98,228,1673942400"; d="scan'208";a="334871177" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2023 12:21:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10637"; a="705398109" X-IronPort-AV: E=Sophos;i="5.98,228,1673942400"; d="scan'208";a="705398109" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orsmga008.jf.intel.com with ESMTP; 02 Mar 2023 12:21:59 -0800 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 v3 06/17] test/bbdev: enable early termination for validation Date: Thu, 2 Mar 2023 12:22:00 -0800 Message-Id: <20230302202211.170017-7-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230302202211.170017-1-hernan.vargas@intel.com> References: <20230302202211.170017-1-hernan.vargas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Enhancement to enable early termination for validation tests if the device supports it. Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test_bbdev_perf.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 4de3d937a53d..396473961ad1 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -3773,11 +3773,11 @@ throughput_pmd_lcore_ldpc_dec(void *arg) TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", num_ops); /* For throughput tests we need to disable early termination */ - if (check_bit(ref_op->ldpc_dec.op_flags, - RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE)) - ref_op->ldpc_dec.op_flags -= - RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE; + if (check_bit(ref_op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE)) + ref_op->ldpc_dec.op_flags -= RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE; + ref_op->ldpc_dec.iter_max = get_iter_max(); + /* Since ET is disabled, the expected iter_count is iter_max */ ref_op->ldpc_dec.iter_count = ref_op->ldpc_dec.iter_max; if (test_vector.op_type != RTE_BBDEV_OP_NONE) @@ -4463,7 +4463,7 @@ latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs, struct rte_bbdev_dec_op *ref_op, int vector_mask, uint16_t dev_id, uint16_t queue_id, const uint16_t num_to_process, uint16_t burst_sz, - uint64_t *total_time, uint64_t *min_time, uint64_t *max_time) + uint64_t *total_time, uint64_t *min_time, uint64_t *max_time, bool disable_et) { int ret = TEST_SUCCESS; uint16_t i, j, dequeued; @@ -4479,8 +4479,14 @@ latency_test_dec(struct rte_mempool *mempool, burst_sz = num_to_process - dequeued; ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); - TEST_ASSERT_SUCCESS(ret, - "rte_bbdev_dec_op_alloc_bulk() failed"); + TEST_ASSERT_SUCCESS(ret, "rte_bbdev_dec_op_alloc_bulk() failed"); + + ref_op->turbo_dec.iter_max = get_iter_max(); + /* For validation tests we want to enable early termination */ + if (!disable_et && !check_bit(ref_op->turbo_dec.op_flags, + RTE_BBDEV_TURBO_EARLY_TERMINATION)) + ref_op->turbo_dec.op_flags |= RTE_BBDEV_TURBO_EARLY_TERMINATION; + if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_dec_op(ops_enq, burst_sz, dequeued, bufs->inputs, @@ -4559,10 +4565,12 @@ latency_test_ldpc_dec(struct rte_mempool *mempool, /* For latency tests we need to disable early termination */ if (disable_et && check_bit(ref_op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE)) - ref_op->ldpc_dec.op_flags -= - RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE; + ref_op->ldpc_dec.op_flags -= RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE; + ref_op->ldpc_dec.iter_max = get_iter_max(); - ref_op->ldpc_dec.iter_count = ref_op->ldpc_dec.iter_max; + /* When ET is disabled, the expected iter_count is iter_max */ + if (disable_et) + ref_op->ldpc_dec.iter_count = ref_op->ldpc_dec.iter_max; if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_ldpc_dec_op(ops_enq, burst_sz, dequeued, @@ -4871,7 +4879,7 @@ validation_latency_test(struct active_device *ad, iter = latency_test_dec(op_params->mp, bufs, op_params->ref_dec_op, op_params->vector_mask, ad->dev_id, queue_id, num_to_process, - burst_sz, &total_time, &min_time, &max_time); + burst_sz, &total_time, &min_time, &max_time, latency_flag); else if (op_type == RTE_BBDEV_OP_LDPC_ENC) iter = latency_test_ldpc_enc(op_params->mp, bufs, op_params->ref_enc_op, ad->dev_id, queue_id, -- 2.37.1