[PATCH v3 08/17] test/bbdev: test start/stop bbdev API

Maxime Coquelin maxime.coquelin at redhat.com
Fri Mar 3 13:31:07 CET 2023



On 3/2/23 21:22, Hernan Vargas wrote:
> Add a call to queue start and queue stop specifically for testing the
> bbdev API.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
> ---
>   app/test-bbdev/test_bbdev_perf.c | 19 +++++++++++++------
>   1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index 546fc195aac4..7bfc4cd5779e 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -886,19 +886,23 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
>   					"Allocated all queues (id=%u) at prio%u on dev%u\n",
>   					queue_id, qconf.priority, dev_id);
>   			qconf.priority++;
> -			ret = rte_bbdev_queue_configure(ad->dev_id, queue_id,
> -					&qconf);
> +			ret = rte_bbdev_queue_configure(ad->dev_id, queue_id, &qconf);
>   		}
>   		if (ret != 0) {
> -			printf("All queues on dev %u allocated: %u\n",
> -					dev_id, queue_id);
> +			printf("All queues on dev %u allocated: %u\n", dev_id, queue_id);
> +			break;
> +		}
> +		ret = rte_bbdev_queue_start(ad->dev_id, queue_id);
> +		if (ret != 0) {
> +			printf("Failed to start queue on dev %u q_id: %u\n", dev_id, queue_id);
>   			break;
>   		}
>   		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 the related operation capability\n"
> +			"\tor the device may not have been configured yet", dev_id);
>   	ad->nb_queues = queue_id;
>   
>   	set_avail_op(ad, op_type);
> @@ -3844,6 +3848,9 @@ throughput_pmd_lcore_ldpc_dec(void *arg)
>   		TEST_ASSERT_SUCCESS(ret, "Validation failed!");
>   	}
>   
> +	ret = rte_bbdev_queue_stop(tp->dev_id, queue_id);
> +	if (ret != 0)
> +		printf("Failed to stop queue on dev %u q_id: %u\n", 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);

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list