[PATCH 21.11 5/7] baseband/acc100: fix null HARQ input case
Hernan Vargas
hernan.vargas at intel.com
Thu Nov 17 05:46:50 CET 2022
[ upstream commit 75114f78cf5819ab857f45d4ed1fc1de0368042e ]
An invalid HW operation may be caused in case the user provide
the BBDEV API and HARQ operation with input enabled and zero input.
Added protection for that case.
Fixes: 5ad5060f8f7 ("baseband/acc100: add LDPC processing functions")
Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.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 1fb2d24ded..c90d7b8e1a 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1318,6 +1318,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,
--
2.37.1
More information about the stable
mailing list