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 EFFF1423FE; Tue, 17 Jan 2023 17:50:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5970742D3D; Tue, 17 Jan 2023 17:50:28 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 53436400EF for ; Tue, 17 Jan 2023 17:50:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673974225; x=1705510225; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fdJFRHBD5IJMVFsLjdxdhzJv1uoioJqkfRmrki+5cNc=; b=eY/PSPFwYwZQglIkhlu53Xzqhl6MXZkggHcBkan+HLje4cRoHpWckMvZ QbvjxrwYHgM42vwRZl90DpqaIcR6ZMToZuwtAHGbmiVrbRdRkYKyx0u2p DNffcy1xTnT0ASDvF+65YH3Rei4ffPALo4kggT52lKPJY+VjvFsNkyvvG R1oPv44yhpKEk9ltasvF1VFY7l3KGCz5q4gB/KuHvycwEpjCo1W8/uzD4 iSTfJxHixDWG4l5DBN12mU4nQb18Ut96SbcGKB+q177LByaCxoRvtMXJ6 YcNjvFccTLq3rO5x4f8cErgUw+4tOEZXpzTIb221FhrWft+FlIJ5Mu+nq g==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="326022056" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="326022056" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2023 08:50:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="833235089" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="833235089" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orsmga005.jf.intel.com with ESMTP; 17 Jan 2023 08:50:23 -0800 From: Hernan Vargas To: dev@dpdk.org, maxime.coquelin@redhat.com, gakhil@marvell.com, trix@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v1 02/13] test/bbdev: refactor TB throughput report Date: Tue, 17 Jan 2023 08:50:12 -0800 Message-Id: <20230117165023.20567-3-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230117165023.20567-1-hernan.vargas@intel.com> References: <20230117165023.20567-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 Refactor calculation for tb_size. No functional impact. Signed-off-by: Hernan Vargas --- app/test-bbdev/test_bbdev_perf.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index cc7b5481d6..1a8a6b9f82 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -2613,18 +2613,15 @@ calc_enc_TB_size(struct rte_bbdev_enc_op *op) static uint32_t calc_ldpc_enc_TB_size(struct rte_bbdev_enc_op *op) { - uint8_t i; - uint32_t c, r, tb_size = 0; + uint32_t tb_size = 0; uint16_t sys_cols = (op->ldpc_enc.basegraph == 1) ? 22 : 10; if (op->ldpc_enc.code_block_mode == RTE_BBDEV_CODE_BLOCK) { tb_size = sys_cols * op->ldpc_enc.z_c - op->ldpc_enc.n_filler; } else { - c = op->turbo_enc.tb_params.c; - r = op->turbo_enc.tb_params.r; - for (i = 0; i < c-r; i++) - tb_size += sys_cols * op->ldpc_enc.z_c - - op->ldpc_enc.n_filler; + tb_size = (sys_cols * op->ldpc_enc.z_c - op->ldpc_enc.n_filler) + * (op->ldpc_enc.tb_params.c - + op->ldpc_enc.tb_params.r); } return tb_size; } -- 2.37.1