Skip to contentSkip to conversation

app/bbdev: minor application updates

PATCH Applied Nicolas Chautru 3 participants 8 messages Oct 25, 2024 – Nov 8, 2024

lore
Share & tools
lore
#0 lore raw

cover app/bbdev: minor application updates

Hi Maxime, all,

Adding a couple of changes to the built in test application for bbdev test on top of previous changes.

Thanks,
Nic

Nicolas Chautru (2):
app/bbdev: add capture of queue dump
app/bbdev: add support for interrupt disable

 app/test-bbdev/test_bbdev_perf.c | 40 ++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
Signature · 1 line
2.34.1
#1 lore raw

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

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

---
 app/test-bbdev/test_bbdev_perf.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
app/test-bbdev/test_bbdev_perf.c +16 -0
index 9be360b225..405c22de44 100644
@@ -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;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/2
#2 lore raw

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

Quoted 42 lines · Nicolas Chautru

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

---
  app/test-bbdev/test_bbdev_perf.c | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)
app/test-bbdev/test_bbdev_perf.c +16 -0
index 9be360b225..405c22de44 100644
@@ -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 on v1 1/2
#3 lore raw

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

In reply to Nicolas Chautru
Quoted 32 lines · Nicolas Chautru

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

---
  app/test-bbdev/test_bbdev_perf.c | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)
app/test-bbdev/test_bbdev_perf.c +9 -0
index 9be360b225..405c22de44 100644
@@ -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;

app/test-bbdev/test_bbdev_perf.c run_test_case_on_device(test_case_function *test_case_func, uint8_t dev_id, · line 3130

Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +7 -0
+		}
+		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;

Thanks,
Maxime

#4 lore raw

PATCH 2/2 app/bbdev: add support for interrupt disable

In reply to Nicolas Chautru

Adding support for calling the interrupt disable api for coverage.

---
 app/test-bbdev/test_bbdev_perf.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
app/test-bbdev/test_bbdev_perf.c +24 -0
index 405c22de44..6ee1ca34b2 100644
@@ -3535,6 +3535,10 @@ throughput_intr_lcore_ldpc_dec(void *arg)
 			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
 	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
 	return TEST_SUCCESS;
 }
 
@@ -3629,6 +3633,10 @@ throughput_intr_lcore_dec(void *arg)
 			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
 	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
 	return TEST_SUCCESS;
 }
 
@@ -3718,6 +3726,10 @@ throughput_intr_lcore_enc(void *arg)
 			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
 	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
 	return TEST_SUCCESS;
 }
 
@@ -3810,6 +3822,10 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
 	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
 	return TEST_SUCCESS;
 }
 
@@ -3901,6 +3917,10 @@ throughput_intr_lcore_fft(void *arg)
 			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
 	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
 	return TEST_SUCCESS;
 }
 
@@ -3986,6 +4006,10 @@ throughput_intr_lcore_mldts(void *arg)
 			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
 	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
 	return TEST_SUCCESS;
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 2/2
#5 lore raw

Re: [PATCH v1 2/2] app/bbdev: add support for interrupt disable

Quoted 78 lines · Nicolas Chautru

Adding support for calling the interrupt disable api for coverage.

---
  app/test-bbdev/test_bbdev_perf.c | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
app/test-bbdev/test_bbdev_perf.c +24 -0
index 405c22de44..6ee1ca34b2 100644
@@ -3535,6 +3535,10 @@ throughput_intr_lcore_ldpc_dec(void *arg)
  			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
  	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
  	return TEST_SUCCESS;
  }
 
@@ -3629,6 +3633,10 @@ throughput_intr_lcore_dec(void *arg)
  			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
  	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
  	return TEST_SUCCESS;
  }
 
@@ -3718,6 +3726,10 @@ throughput_intr_lcore_enc(void *arg)
  			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
  	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
  	return TEST_SUCCESS;
  }
 
@@ -3810,6 +3822,10 @@ throughput_intr_lcore_ldpc_enc(void *arg)
  			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
  	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
  	return TEST_SUCCESS;
  }
 
@@ -3901,6 +3917,10 @@ throughput_intr_lcore_fft(void *arg)
  			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
  	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
  	return TEST_SUCCESS;
  }
 
@@ -3986,6 +4006,10 @@ throughput_intr_lcore_mldts(void *arg)
  			rte_atomic_store_explicit(&tp->nb_dequeued, 0, rte_memory_order_relaxed);
  	}
 
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_disable(tp->dev_id, queue_id),
+			"Failed to disable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
  	return TEST_SUCCESS;
  }
 
#7 lore raw
In reply to Nicolas Chautru
Quoted 8 lines · Nicolas Chautru

Hi Maxime, all,

Adding a couple of changes to the built in test application for bbdev test on top of previous changes.

Thanks,
Nic

Quoted 7 lines

Nicolas Chautru (2):
app/bbdev: add capture of queue dump
app/bbdev: add support for interrupt disable

  app/test-bbdev/test_bbdev_perf.c | 40 ++++++++++++++++++++++++++++++++
  1 file changed, 40 insertions(+)

Applied to next-baseband/for-main

Thanks,
Maxime