Use ldpc or turbo iteration counter based on the operation type.

Fixes: 5ad5060f8f7 ("baseband/acc100: add LDPC processing functions")
Cc: sta...@dpdk.org

Signed-off-by: Hernan Vargas <hernan.var...@intel.com>
---
 drivers/baseband/acc/rte_acc100_pmd.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/baseband/acc/rte_acc100_pmd.c 
b/drivers/baseband/acc/rte_acc100_pmd.c
index 0177a9e0ea..d77d3b77b5 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -4035,8 +4035,12 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct 
rte_bbdev_dec_op **ref_op,
                /* CRC invalid if error exists */
                if (!op->status)
                        op->status |= rsp.crc_status << RTE_BBDEV_CRC_ERROR;
-               op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
-                               op->turbo_dec.iter_count);
+               if (q->op_type == RTE_BBDEV_OP_LDPC_DEC)
+                       op->ldpc_dec.iter_count = RTE_MAX((uint8_t) 
rsp.iter_cnt,
+                                       op->ldpc_dec.iter_count);
+               else
+                       op->turbo_dec.iter_count = RTE_MAX((uint8_t) 
rsp.iter_cnt,
+                                       op->turbo_dec.iter_count);
 
                /* Check if this is the last desc in batch (Atomic Queue) */
                if (desc->req.last_desc_in_batch) {
-- 
2.37.1

Reply via email to