DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nicolas Chautru <nicolas.chautru@intel.com>
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	[thread overview]
Message-ID: <20231103233413.756110-5-nicolas.chautru@intel.com> (raw)
In-Reply-To: <20231103233413.756110-1-nicolas.chautru@intel.com>

From: Hernan Vargas <hernan.vargas@intel.com>

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 <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 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


  parent reply	other threads:[~2023-11-03 23:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 23:34 [PATCH v3 00/10] test-bbdev changes for 23.11 Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 01/10] test/bbdev: fix python script subprocess Nicolas Chautru
2023-11-09 12:37   ` Maxime Coquelin
2023-11-03 23:34 ` [PATCH v3 02/10] test/bbdev: rename macros from acc200 to vrb Nicolas Chautru
2023-11-09 12:37   ` Maxime Coquelin
2023-11-03 23:34 ` [PATCH v3 03/10] test/bbdev: handle exception for LLR generation Nicolas Chautru
2023-11-09 12:46   ` Maxime Coquelin
2023-11-03 23:34 ` Nicolas Chautru [this message]
2023-11-03 23:34 ` [PATCH v3 05/10] test/bbdev: assert failed test for queue configure Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 06/10] test/bbdev: ldpc encoder concatenation vector Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 07/10] test/bbdev: add MLD support Nicolas Chautru
2023-11-09 15:44   ` Maxime Coquelin
2023-11-03 23:34 ` [PATCH v3 08/10] test/bbdev: support new FFT capabilities Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 09/10] test/bbdev: support 4 bit LLR compression Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 10/10] test/bbdev: update python script parameters Nicolas Chautru
2023-11-09 10:16   ` Maxime Coquelin
2023-11-09 15:37     ` Chautru, Nicolas
2023-11-09 15:51 ` [PATCH v3 00/10] test-bbdev changes for 23.11 Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231103233413.756110-5-nicolas.chautru@intel.com \
    --to=nicolas.chautru@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=hernan.vargas@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).