The iteration count was not using correct structure (4G vs 5G)
in TB mode.

Fixes: bec597b78a0 ("baseband/acc200: add LTE processing")
Cc: sta...@dpdk.org

Signed-off-by: Nicolas Chautru <nicolas.chau...@intel.com>
---
 drivers/baseband/acc/rte_vrb_pmd.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/baseband/acc/rte_vrb_pmd.c 
b/drivers/baseband/acc/rte_vrb_pmd.c
index b251ad25c6..0bd5c65177 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -2876,7 +2876,7 @@ vrb_dequeue_ldpc_dec_one_op_cb(struct 
rte_bbdev_queue_data *q_data,
        return 1;
 }
 
-/* Dequeue one decode operations from device in TB mode. */
+/* Dequeue one decode operations from device in TB mode for 4G or 5G. */
 static inline int
 vrb_dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op 
**ref_op,
                uint16_t dequeued_cbs, uint32_t *aq_dequeued)
@@ -2930,8 +2930,12 @@ vrb_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.34.1

Reply via email to