[PATCH v1 04/11] test/bbdev: handle exception for LLR generation
Maxime Coquelin
maxime.coquelin at redhat.com
Tue Oct 17 21:30:58 CEST 2023
On 9/29/23 20:13, Hernan Vargas wrote:
> Add range limit to prevent LLR generation greater than the data buffer
> size.
Should be a fix?
> Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
> ---
> app/test-bbdev/test_bbdev_perf.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index d4c001de0093..54cb2090f988 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -1838,6 +1838,12 @@ generate_turbo_llr_input(uint16_t n, struct rte_bbdev_op_data *inputs,
> range = ref_op->turbo_dec.input.length;
> N0 = 1.0 / pow(10.0, get_snr() / 10.0);
>
> + if (range > inputs[0].data->data_len) {
> + printf("Warning: Limiting LLR generation to first segment (%d from %d)\n",
> + inputs[0].data->data_len, range);
> + range = inputs[0].data->data_len;
> + }
> +
> for (i = 0; i < n; ++i) {
> m = inputs[i].data;
> int8_t *llrs = rte_pktmbuf_mtod_offset(m, int8_t *, 0);
More information about the dev
mailing list