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 102B341CF0; Mon, 20 Feb 2023 21:12:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0253B430DE; Mon, 20 Feb 2023 21:12:14 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 366A640395 for ; Mon, 20 Feb 2023 21:12:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676923931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7WJ2Y8+P5AB/DSiPCepctOnryLew09zOE7MerGz6ULM=; b=HRp9BYx1MwRHrvC2dIBUsCljgIqQEFwwxJXcLEATm/F6LI1v7p36PU03qDtG8IpfrCQmkc doFuYVlhPMMAdNLdsnpHeNMk5fheEQ3PoFcvVQDZ9tCXeWMP1p2bp52koia1PSjjg7hVSU DDI2oTZMnaeqU/THMQJFKZ4tkdV5/24= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-631---IUZYuXP9uXx4kufpDWHQ-1; Mon, 20 Feb 2023 15:12:08 -0500 X-MC-Unique: --IUZYuXP9uXx4kufpDWHQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1626F3806723; Mon, 20 Feb 2023 20:12:08 +0000 (UTC) Received: from [10.39.208.21] (unknown [10.39.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D8EEF2166B26; Mon, 20 Feb 2023 20:12:06 +0000 (UTC) Message-ID: <07d12f7a-ee2b-3563-86e5-6976208996d5@redhat.com> Date: Mon, 20 Feb 2023 21:12:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v2 05/16] test/bbdev: enable early termination for validation To: Hernan Vargas , dev@dpdk.org, gakhil@marvell.com, trix@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com References: <20230215170949.60569-1-hernan.vargas@intel.com> <20230215170949.60569-6-hernan.vargas@intel.com> From: Maxime Coquelin In-Reply-To: <20230215170949.60569-6-hernan.vargas@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 2/15/23 18:09, Hernan Vargas wrote: > Enhancement to enable early termination for validation tests if the > device supports it. > > Signed-off-by: Hernan Vargas > --- > 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 dede0f900e..8c4b82efca 100644 > --- a/app/test-bbdev/test_bbdev_perf.c > +++ b/app/test-bbdev/test_bbdev_perf.c > @@ -3775,11 +3775,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) > @@ -4465,7 +4465,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; > @@ -4481,8 +4481,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, > @@ -4561,10 +4567,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, > @@ -4873,7 +4881,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, Reviewed-by: Maxime Coquelin Thanks, Maxime