[PATCH v1 1/2] app/bbdev: add capture of queue dump

Nicolas Chautru nicolas.chautru at intel.com
Fri Oct 25 19:57:08 CEST 2024


Capturing additional queue dump information in the
bbdev-test application using the api introduced earlier.

Signed-off-by: Nicolas Chautru <nicolas.chautru at intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 9be360b225..405c22de44 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -111,6 +111,8 @@ static uint32_t ldpc_cap_flags;
 /* FFT window width predefined on device and on vector. */
 static int fft_window_width_dev;
 
+bool dump_ops = true;
+
 /* Represents tested active devices */
 static struct active_device {
 	const char *driver_name;
@@ -3109,6 +3111,20 @@ run_test_case_on_device(test_case_function *test_case_func, uint8_t dev_id,
 	/* Run test case function */
 	t_ret = test_case_func(ad, op_params);
 
+	if (dump_ops) {
+		/* Dump queue information in local file. */
+		static FILE *fd;
+		fd = fopen("./dump_bbdev_queue_ops.txt", "w");
+		if (fd == NULL) {
+			printf("Open dump file error.\n");
+			return -1;
+		}
+		rte_bbdev_queue_ops_dump(ad->dev_id, ad->queue_ids[i], fd);
+		fclose(fd);
+		/* Run it once only. */
+		dump_ops = false;
+	}
+
 	/* Free active device resources and return */
 	free_buffers(ad, op_params);
 	return t_ret;
-- 
2.34.1



More information about the dev mailing list