[v1,06/13] test/bbdev: log capture from queue stop

Message ID 20230117165023.20567-7-hernan.vargas@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series test/bbdev: changes for 23.03 |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Hernan Vargas Jan. 17, 2023, 4:50 p.m. UTC
  Improve log capture in bbdev not requiring standard output.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Maxime Coquelin Jan. 31, 2023, 10:07 a.m. UTC | #1
On 1/17/23 17:50, Hernan Vargas wrote:
> Improve log capture in bbdev not requiring standard output.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test_bbdev_perf.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index 36ea399938..ffb2de0604 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -889,6 +889,7 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
>   			ret = rte_bbdev_queue_configure(ad->dev_id, queue_id,
>   					&qconf);
>   		}
> +		rte_bbdev_queue_start(ad->dev_id, queue_id);
>   		if (ret != 0) {
>   			printf("All queues on dev %u allocated: %u\n",
>   					dev_id, queue_id);
> @@ -897,8 +898,8 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
>   		ad->queue_ids[queue_id] = queue_id;
>   	}
>   	TEST_ASSERT(queue_id != 0,
> -			"ERROR Failed to configure any queues on dev %u",
> -			dev_id);
> +			"ERROR Failed to configure any queues on dev %u\n"
> +			"\tthe device may not support or have been configured", dev_id);
>   	ad->nb_queues = queue_id;
>   
>   	set_avail_op(ad, op_type);
> @@ -3844,6 +3845,7 @@ throughput_pmd_lcore_ldpc_dec(void *arg)
>   		TEST_ASSERT_SUCCESS(ret, "Validation failed!");
>   	}
>   
> +	rte_bbdev_queue_stop(tp->dev_id, queue_id);

The patch is doing more than advertised.

>   	rte_bbdev_dec_op_free_bulk(ops_enq, num_ops);
>   
>   	double tb_len_bits = calc_ldpc_dec_TB_size(ref_op);

Maxime
  

Patch

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 36ea399938..ffb2de0604 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -889,6 +889,7 @@  add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
 			ret = rte_bbdev_queue_configure(ad->dev_id, queue_id,
 					&qconf);
 		}
+		rte_bbdev_queue_start(ad->dev_id, queue_id);
 		if (ret != 0) {
 			printf("All queues on dev %u allocated: %u\n",
 					dev_id, queue_id);
@@ -897,8 +898,8 @@  add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
 		ad->queue_ids[queue_id] = queue_id;
 	}
 	TEST_ASSERT(queue_id != 0,
-			"ERROR Failed to configure any queues on dev %u",
-			dev_id);
+			"ERROR Failed to configure any queues on dev %u\n"
+			"\tthe device may not support or have been configured", dev_id);
 	ad->nb_queues = queue_id;
 
 	set_avail_op(ad, op_type);
@@ -3844,6 +3845,7 @@  throughput_pmd_lcore_ldpc_dec(void *arg)
 		TEST_ASSERT_SUCCESS(ret, "Validation failed!");
 	}
 
+	rte_bbdev_queue_stop(tp->dev_id, queue_id);
 	rte_bbdev_dec_op_free_bulk(ops_enq, num_ops);
 
 	double tb_len_bits = calc_ldpc_dec_TB_size(ref_op);