[v3,2/7] baseband/acc: acc100 fix iteration counter in TB

Message ID 20230112193609.273578-3-hernan.vargas@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series baseband/acc: changes for 23.03 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hernan Vargas Jan. 12, 2023, 7:36 p.m. UTC
  Use ldpc or turbo iteration counter based on the operation type.

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

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

Comments

Maxime Coquelin Jan. 17, 2023, 10:49 a.m. UTC | #1
On 1/12/23 20:36, Hernan Vargas wrote:
> Use ldpc or turbo iteration counter based on the operation type.
> 
> Fixes: 5ad5060f8f7 ("baseband/acc100: add LDPC processing functions")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@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 146a22bd64..a00314c957 100644
> --- a/drivers/baseband/acc/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc/rte_acc100_pmd.c
> @@ -4033,8 +4033,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) {

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  

Patch

diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 146a22bd64..a00314c957 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -4033,8 +4033,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) {