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 D026543284; Sat, 4 Nov 2023 00:42:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F269142DAC; Sat, 4 Nov 2023 00:41:35 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id CD57C40281; Sat, 4 Nov 2023 00:41:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699054890; x=1730590890; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a4eO71oJPDCO0a1udbjsPOxOKpnhqUNjk0NkPZ8VrI4=; b=ZrIGosmNqDTGNABlS1X7lAlM+l/HGHm502uPnIdsH0z8b3rmE7olwECT BDOwhFIks52ii6DXkTpPXtwdEgWCL2JvEAxWJWvkDiCJALkFFkAF3IOub hTWFHSu9wQ2HwSt2XwjnIUODi8It2/L+PaNVTUyu3iWqpCdZAvUH2bT40 FpFHB75vXjwbNELQ87affQYwFInc3U7gsawq11XQ4EeQEMjNx1tqeP+15 oe94/jowzVYDSO+qXAeqFDfH8AoZ7LfsMNIjLOEhU83+dMcHMjoDXQmaF aUoxrXluyJ2E2zEtXtH3rr/LD7aIqxVMBTZC8oVclv0RVB6hXH4khYiwV Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="386213575" X-IronPort-AV: E=Sophos;i="6.03,275,1694761200"; d="scan'208";a="386213575" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 16:41:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="935249150" X-IronPort-AV: E=Sophos;i="6.03,275,1694761200"; d="scan'208";a="935249150" Received: from spr-npg-bds1-eec2.sn.intel.com (HELO spr-npg-bds1-eec2..) ([10.233.181.123]) by orsmga005.jf.intel.com with ESMTP; 03 Nov 2023 16:41:28 -0700 From: Nicolas Chautru To: dev@dpdk.org, maxime.coquelin@redhat.com Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com, hernan.vargas@intel.com, stable@dpdk.org Subject: [PATCH v3 04/10] test/bbdev: improve test log messages Date: Fri, 3 Nov 2023 23:34:07 +0000 Message-Id: <20231103233413.756110-5-nicolas.chautru@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231103233413.756110-1-nicolas.chautru@intel.com> References: <20231103233413.756110-1-nicolas.chautru@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 From: Hernan Vargas Add a print message for failure to retrieve stats on bbdev. Add vector name in logs. Remove unnecessary prints. Update code comments and cosmetic changes. No functional impact. Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/main.c | 3 ++- app/test-bbdev/test_bbdev_perf.c | 26 ++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/test-bbdev/main.c b/app/test-bbdev/main.c index ec830eb32b..8f6852e2ef 100644 --- a/app/test-bbdev/main.c +++ b/app/test-bbdev/main.c @@ -107,7 +107,8 @@ unit_test_suite_runner(struct unit_test_suite *suite) end = rte_rdtsc_precise(); printf(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n"); - printf(" + Test Suite Summary : %s\n", suite->suite_name); + printf(" + Test Suite Summary : %s - %s\n", + suite->suite_name, get_vector_filename()); printf(" + Tests Total : %2d\n", total); printf(" + Tests Skipped : %2d\n", skipped); printf(" + Tests Passed : %2d\n", succeeded); diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 468cfeccd2..5f1e5de002 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -721,9 +721,9 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, conf.vf_dl_queues_number[i] = VF_DL_5G_QUEUE_VALUE; } - /* UL bandwidth. Needed for schedule algorithm */ + /* UL bandwidth. Needed only for Vista Creek 5GNR schedule algorithm */ conf.ul_bandwidth = UL_5G_BANDWIDTH; - /* DL bandwidth */ + /* DL bandwidth. Needed only for Vista Creek 5GNR schedule algorithm */ conf.dl_bandwidth = DL_5G_BANDWIDTH; /* UL & DL load Balance Factor to 64 */ @@ -743,7 +743,7 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, struct rte_acc_conf conf; unsigned int i; - printf("Configure ACC100/ACC101 FEC Driver %s with default values\n", + printf("Configure ACC100 FEC device %s with default values\n", info->drv.driver_name); /* clear default configuration before initialization */ @@ -1047,13 +1047,15 @@ ut_setup(void) static void ut_teardown(void) { - uint8_t i, dev_id; + uint8_t i, dev_id, ret; struct rte_bbdev_stats stats; for (i = 0; i < nb_active_devs; i++) { dev_id = active_devs[i].dev_id; /* read stats and print */ - rte_bbdev_stats_get(dev_id, &stats); + ret = rte_bbdev_stats_get(dev_id, &stats); + if (ret != 0) + printf("Failed to get stats on bbdev %u\n", dev_id); /* Stop the device */ rte_bbdev_stop(dev_id); } @@ -2227,9 +2229,11 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op, if ((error > 8 && (abs_harq_origin < (llr_max - 16))) || (error > 16)) { + /* printf("HARQ mismatch %d: exp %d act %d => %d\n", j, harq_orig[j], harq_out[jj], error); + */ byte_error++; cum_error += error; } @@ -5270,7 +5274,7 @@ offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs, burst_sz = num_to_process - dequeued; ret = rte_bbdev_fft_op_alloc_bulk(mempool, ops_enq, burst_sz); - TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", burst_sz); + TEST_ASSERT_SUCCESS(ret, "rte_bbdev_fft_op_alloc_bulk() failed"); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_fft_op(ops_enq, burst_sz, dequeued, bufs->inputs, @@ -5352,7 +5356,7 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs, burst_sz = num_to_process - dequeued; ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); - TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", burst_sz); + TEST_ASSERT_SUCCESS(ret, "rte_bbdev_dec_op_alloc_bulk() failed"); ref_op->turbo_dec.iter_max = get_iter_max(); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_dec_op(ops_enq, burst_sz, dequeued, @@ -5439,7 +5443,7 @@ offload_latency_test_ldpc_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, "Allocation failed for %d ops", burst_sz); + TEST_ASSERT_SUCCESS(ret, "rte_bbdev_dec_op_alloc_bulk() failed"); ref_op->ldpc_dec.iter_max = get_iter_max(); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_ldpc_dec_op(ops_enq, burst_sz, dequeued, @@ -5534,8 +5538,7 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, burst_sz = num_to_process - dequeued; ret = rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz); - TEST_ASSERT_SUCCESS(ret, - "rte_bbdev_enc_op_alloc_bulk() failed"); + TEST_ASSERT_SUCCESS(ret, "rte_bbdev_enc_op_alloc_bulk() failed"); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_enc_op(ops_enq, burst_sz, dequeued, bufs->inputs, @@ -5617,8 +5620,7 @@ offload_latency_test_ldpc_enc(struct rte_mempool *mempool, burst_sz = num_to_process - dequeued; ret = rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz); - TEST_ASSERT_SUCCESS(ret, - "rte_bbdev_enc_op_alloc_bulk() failed"); + TEST_ASSERT_SUCCESS(ret, "rte_bbdev_enc_op_alloc_bulk() failed"); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_ldpc_enc_op(ops_enq, burst_sz, dequeued, bufs->inputs, -- 2.34.1