patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v3 1/7] baseband/acc: acc100 free harq layout pointer
       [not found] <20230112193609.273578-1-hernan.vargas@intel.com>
@ 2023-01-12 19:36 ` Hernan Vargas
  2023-01-17 10:49   ` Maxime Coquelin
  2023-01-12 19:36 ` [PATCH v3 2/7] baseband/acc: acc100 fix iteration counter in TB Hernan Vargas
  1 sibling, 1 reply; 4+ messages in thread
From: Hernan Vargas @ 2023-01-12 19:36 UTC (permalink / raw)
  To: dev, maxime.coquelin, gakhil, trix
  Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable

Explicitly call rte_free for harq_layout pointer in dev_close function
to prevent memory leak.

Fixes: ba2262fe16c ("baseband/acc100: fix close cleanup")
Cc: stable@dpdk.org

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

diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index b3164529dd..146a22bd64 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -620,6 +620,7 @@ acc100_dev_close(struct rte_bbdev *dev)
 		rte_free(d->tail_ptrs);
 		rte_free(d->info_ring);
 		rte_free(d->sw_rings_base);
+		rte_free(d->harq_layout);
 		d->sw_rings_base = NULL;
 		d->tail_ptrs = NULL;
 		d->info_ring = NULL;
-- 
2.37.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 2/7] baseband/acc: acc100 fix iteration counter in TB
       [not found] <20230112193609.273578-1-hernan.vargas@intel.com>
  2023-01-12 19:36 ` [PATCH v3 1/7] baseband/acc: acc100 free harq layout pointer Hernan Vargas
@ 2023-01-12 19:36 ` Hernan Vargas
  2023-01-17 10:49   ` Maxime Coquelin
  1 sibling, 1 reply; 4+ messages in thread
From: Hernan Vargas @ 2023-01-12 19:36 UTC (permalink / raw)
  To: dev, maxime.coquelin, gakhil, trix
  Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable

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) {
-- 
2.37.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 1/7] baseband/acc: acc100 free harq layout pointer
  2023-01-12 19:36 ` [PATCH v3 1/7] baseband/acc: acc100 free harq layout pointer Hernan Vargas
@ 2023-01-17 10:49   ` Maxime Coquelin
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2023-01-17 10:49 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable



On 1/12/23 20:36, Hernan Vargas wrote:
> Explicitly call rte_free for harq_layout pointer in dev_close function
> to prevent memory leak.
> 
> Fixes: ba2262fe16c ("baseband/acc100: fix close cleanup")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   drivers/baseband/acc/rte_acc100_pmd.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
> index b3164529dd..146a22bd64 100644
> --- a/drivers/baseband/acc/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc/rte_acc100_pmd.c
> @@ -620,6 +620,7 @@ acc100_dev_close(struct rte_bbdev *dev)
>   		rte_free(d->tail_ptrs);
>   		rte_free(d->info_ring);
>   		rte_free(d->sw_rings_base);
> +		rte_free(d->harq_layout);
>   		d->sw_rings_base = NULL;
>   		d->tail_ptrs = NULL;
>   		d->info_ring = NULL;

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

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 2/7] baseband/acc: acc100 fix iteration counter in TB
  2023-01-12 19:36 ` [PATCH v3 2/7] baseband/acc: acc100 fix iteration counter in TB Hernan Vargas
@ 2023-01-17 10:49   ` Maxime Coquelin
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2023-01-17 10:49 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable



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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-17 10:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230112193609.273578-1-hernan.vargas@intel.com>
2023-01-12 19:36 ` [PATCH v3 1/7] baseband/acc: acc100 free harq layout pointer Hernan Vargas
2023-01-17 10:49   ` Maxime Coquelin
2023-01-12 19:36 ` [PATCH v3 2/7] baseband/acc: acc100 fix iteration counter in TB Hernan Vargas
2023-01-17 10:49   ` Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).