[v1,1/2] app/bbdev: add capture of queue dump
Checks
Commit Message
Capturing additional queue dump information in the
bbdev-test application using the api introduced earlier.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
app/test-bbdev/test_bbdev_perf.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
Comments
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
On 25-10-2024 23:27, Nicolas Chautru wrote:
> Capturing additional queue dump information in the
> bbdev-test application using the api introduced earlier.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@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;
On 10/25/24 19:57, Nicolas Chautru wrote:
> Capturing additional queue dump information in the
> bbdev-test application using the api introduced earlier.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@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;
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
@@ -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;