From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F69BA058E; Thu, 26 Mar 2020 03:47:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 066911C0D0; Thu, 26 Mar 2020 03:46:38 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 992C4378E for ; Thu, 26 Mar 2020 03:46:24 +0100 (CET) IronPort-SDR: 9+1zlFVNo9NBi3s3rZMazBk8B2H82NjCDuww0wDiL252By570UafKbGheNMtRq25FZT30l91vO CSejB+Ww+9Hg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2020 19:46:23 -0700 IronPort-SDR: gglICsX9HsXxwmmhwQlvzQr3+Zf1fs0bFcJDcxk4vghrsRS5okG17LS89uhrdr1CXKiHXOIaGE dFu/tWLA7ewg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,306,1580803200"; d="scan'208";a="247400839" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by orsmga003.jf.intel.com with ESMTP; 25 Mar 2020 19:46:22 -0700 From: Nicolas Chautru To: thomas@monjalon.net, akhil.goyal@nxp.com, dev@dpdk.org Cc: ferruh.yigit@intel.com, Nic Chautru Date: Wed, 25 Mar 2020 19:45:58 -0700 Message-Id: <1585190759-71604-10-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1585190759-71604-1-git-send-email-nicolas.chautru@intel.com> References: <1582778348-113547-15-git-send-email-nicolas.chautru@intel.com> <1585190759-71604-1-git-send-email-nicolas.chautru@intel.com> Subject: [dpdk-dev] [PATCH v4 09/10] test-bbdev: support for offload test for LDPC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Nic Chautru Adding support for the offload latency tests when using the LDPC encoder and decoder operations. Signed-off-by: Nic Chautru --- app/test-bbdev/test_bbdev_perf.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index c45cdd2..6ec17e5 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -4643,7 +4643,7 @@ typedef int (test_case_function)(struct active_device *ad, offload_latency_empty_q_test_dec(uint16_t dev_id, uint16_t queue_id, const uint16_t num_to_process, uint16_t burst_sz, uint64_t *deq_total_time, uint64_t *deq_min_time, - uint64_t *deq_max_time) + uint64_t *deq_max_time, const enum rte_bbdev_op_type op_type) { int i, deq_total; struct rte_bbdev_dec_op *ops[MAX_BURST]; @@ -4657,7 +4657,12 @@ typedef int (test_case_function)(struct active_device *ad, if (unlikely(num_to_process - deq_total < burst_sz)) burst_sz = num_to_process - deq_total; - rte_bbdev_dequeue_dec_ops(dev_id, queue_id, ops, burst_sz); + if (op_type == RTE_BBDEV_OP_LDPC_DEC) + rte_bbdev_dequeue_ldpc_dec_ops(dev_id, queue_id, ops, + burst_sz); + else + rte_bbdev_dequeue_dec_ops(dev_id, queue_id, ops, + burst_sz); deq_last_time = rte_rdtsc_precise() - deq_start_time; *deq_max_time = RTE_MAX(*deq_max_time, deq_last_time); @@ -4672,7 +4677,7 @@ typedef int (test_case_function)(struct active_device *ad, offload_latency_empty_q_test_enc(uint16_t dev_id, uint16_t queue_id, const uint16_t num_to_process, uint16_t burst_sz, uint64_t *deq_total_time, uint64_t *deq_min_time, - uint64_t *deq_max_time) + uint64_t *deq_max_time, const enum rte_bbdev_op_type op_type) { int i, deq_total; struct rte_bbdev_enc_op *ops[MAX_BURST]; @@ -4685,7 +4690,12 @@ typedef int (test_case_function)(struct active_device *ad, if (unlikely(num_to_process - deq_total < burst_sz)) burst_sz = num_to_process - deq_total; - rte_bbdev_dequeue_enc_ops(dev_id, queue_id, ops, burst_sz); + if (op_type == RTE_BBDEV_OP_LDPC_ENC) + rte_bbdev_dequeue_ldpc_enc_ops(dev_id, queue_id, ops, + burst_sz); + else + rte_bbdev_dequeue_enc_ops(dev_id, queue_id, ops, + burst_sz); deq_last_time = rte_rdtsc_precise() - deq_start_time; *deq_max_time = RTE_MAX(*deq_max_time, deq_last_time); @@ -4695,6 +4705,7 @@ typedef int (test_case_function)(struct active_device *ad, return i; } + #endif static int @@ -4732,14 +4743,15 @@ typedef int (test_case_function)(struct active_device *ad, printf("== test: offload latency empty dequeue\ndev: %s, burst size: %u, num ops: %u, op type: %s\n", info.dev_name, burst_sz, num_to_process, op_type_str); - if (op_type == RTE_BBDEV_OP_TURBO_DEC) + if (op_type == RTE_BBDEV_OP_TURBO_DEC || + op_type == RTE_BBDEV_OP_LDPC_DEC) iter = offload_latency_empty_q_test_dec(ad->dev_id, queue_id, num_to_process, burst_sz, &deq_total_time, - &deq_min_time, &deq_max_time); + &deq_min_time, &deq_max_time, op_type); else iter = offload_latency_empty_q_test_enc(ad->dev_id, queue_id, num_to_process, burst_sz, &deq_total_time, - &deq_min_time, &deq_max_time); + &deq_min_time, &deq_max_time, op_type); if (iter <= 0) return TEST_FAILED; -- 1.8.3.1