[PATCH v2 35/37] baseband/acc100: add protection for NULL HARQ input
Maxime Coquelin
maxime.coquelin at redhat.com
Thu Sep 15 13:33:11 CEST 2022
On 8/20/22 04:31, Hernan Vargas wrote:
> It is possible to cause an invalid HW operation in case the user
> provides the BBDEV API and HARQ operation with input enabled and zero
Not sure, but s/and/a/?
This is again a fix, and should be tagged appropriately.
> input. Adding protection for that case.
>
> Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
> ---
> drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 461ebe67cd..be4c1d07ed 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -1457,6 +1457,14 @@ acc100_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc100_fcw_ld *fcw,
> op->ldpc_dec.tb_params.ea :
> op->ldpc_dec.tb_params.eb;
>
> + if (unlikely(check_bit(op->ldpc_dec.op_flags,
> + RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE) &&
> + (op->ldpc_dec.harq_combined_input.length == 0))) {
> + rte_bbdev_log(WARNING, "Null HARQ input size provided");
> + /* Disable HARQ input in that case to carry forward */
> + op->ldpc_dec.op_flags ^= RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE;
> + }
> +
> fcw->hcin_en = check_bit(op->ldpc_dec.op_flags,
> RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE);
> fcw->hcout_en = check_bit(op->ldpc_dec.op_flags,
More information about the dev
mailing list