[v1,1/6] baseband/acc: fix LTE half iteration flag

Message ID 20221101230459.50891-2-nicolas.chautru@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series baseband/acc: fixes on top of RC2 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chautru, Nicolas Nov. 1, 2022, 11:04 p.m. UTC
  The logic for that flag was inverted.
Specific to ACC200.
When starting with even iteration it actually runs
for an additional half iteration.

Fixes: bec597b78a0 ("baseband/acc200: add LTE processing")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/acc/rte_acc200_pmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Maxime Coquelin Nov. 2, 2022, 6:32 a.m. UTC | #1
On 11/2/22 00:04, Nicolas Chautru wrote:
> The logic for that flag was inverted.
> Specific to ACC200.
> When starting with even iteration it actually runs
> for an additional half iteration.
> 
> Fixes: bec597b78a0 ("baseband/acc200: add LTE processing")
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
>   drivers/baseband/acc/rte_acc200_pmd.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
> index 8ee9023451..0cbb9a946b 100644
> --- a/drivers/baseband/acc/rte_acc200_pmd.c
> +++ b/drivers/baseband/acc/rte_acc200_pmd.c
> @@ -1238,8 +1238,7 @@ acc200_fcw_td_fill(const struct rte_bbdev_dec_op *op, struct acc_fcw_td *fcw)
>   	fcw->raw_decoder_input_on = 0;
>   	fcw->max_iter = RTE_MAX((uint8_t) op->turbo_dec.iter_max, 2);
>   	fcw->min_iter = 2;
> -	fcw->half_iter_on = !check_bit(op->turbo_dec.op_flags,
> -			RTE_BBDEV_TURBO_HALF_ITERATION_EVEN);
> +	fcw->half_iter_on = check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_HALF_ITERATION_EVEN);
>   
>   	fcw->early_stop_en = check_bit(op->turbo_dec.op_flags,
>   			RTE_BBDEV_TURBO_EARLY_TERMINATION) & !fcw->soft_output_en;

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

Thanks,
Maxime
  

Patch

diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 8ee9023451..0cbb9a946b 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -1238,8 +1238,7 @@  acc200_fcw_td_fill(const struct rte_bbdev_dec_op *op, struct acc_fcw_td *fcw)
 	fcw->raw_decoder_input_on = 0;
 	fcw->max_iter = RTE_MAX((uint8_t) op->turbo_dec.iter_max, 2);
 	fcw->min_iter = 2;
-	fcw->half_iter_on = !check_bit(op->turbo_dec.op_flags,
-			RTE_BBDEV_TURBO_HALF_ITERATION_EVEN);
+	fcw->half_iter_on = check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_HALF_ITERATION_EVEN);
 
 	fcw->early_stop_en = check_bit(op->turbo_dec.op_flags,
 			RTE_BBDEV_TURBO_EARLY_TERMINATION) & !fcw->soft_output_en;